OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
6 #define MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 6 #define MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | |
9 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
10 #include "media/audio/audio_manager_base.h" | 11 #include "media/audio/audio_manager_base.h" |
11 | 12 |
12 namespace media { | 13 namespace media { |
13 | 14 |
15 class AudioDeviceListenerMac; | |
16 | |
14 // Mac OS X implementation of the AudioManager singleton. This class is internal | 17 // Mac OS X implementation of the AudioManager singleton. This class is internal |
15 // to the audio output and only internal users can call methods not exposed by | 18 // to the audio output and only internal users can call methods not exposed by |
16 // the AudioManager class. | 19 // the AudioManager class. |
17 class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase { | 20 class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase { |
18 public: | 21 public: |
19 AudioManagerMac(); | 22 AudioManagerMac(); |
20 | 23 |
21 // Implementation of AudioManager. | 24 // Implementation of AudioManager. |
22 virtual bool HasAudioOutputDevices() OVERRIDE; | 25 virtual bool HasAudioOutputDevices() OVERRIDE; |
23 virtual bool HasAudioInputDevices() OVERRIDE; | 26 virtual bool HasAudioInputDevices() OVERRIDE; |
24 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) | 27 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) |
25 OVERRIDE; | 28 OVERRIDE; |
26 | 29 |
27 // Implementation of AudioManagerBase. | 30 // Implementation of AudioManagerBase. |
28 virtual AudioOutputStream* MakeLinearOutputStream( | 31 virtual AudioOutputStream* MakeLinearOutputStream( |
29 const AudioParameters& params) OVERRIDE; | 32 const AudioParameters& params) OVERRIDE; |
30 virtual AudioOutputStream* MakeLowLatencyOutputStream( | 33 virtual AudioOutputStream* MakeLowLatencyOutputStream( |
31 const AudioParameters& params) OVERRIDE; | 34 const AudioParameters& params) OVERRIDE; |
32 virtual AudioInputStream* MakeLinearInputStream( | 35 virtual AudioInputStream* MakeLinearInputStream( |
33 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 36 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
34 virtual AudioInputStream* MakeLowLatencyInputStream( | 37 virtual AudioInputStream* MakeLowLatencyInputStream( |
35 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 38 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
36 | 39 |
37 protected: | 40 protected: |
38 virtual ~AudioManagerMac(); | 41 virtual ~AudioManagerMac(); |
39 | 42 |
43 // Implementation of AudioManager. | |
44 virtual void InitializeOnAudioThread() OVERRIDE; | |
scherkus (not reviewing)
2012/10/31 23:17:22
silliness alert!
Initialize() is an empty virtual
DaleCurtis
2012/11/01 00:16:33
I don't know how that would work? You can't post a
scherkus (not reviewing)
2012/11/01 00:47:48
I believe you're referring to https://chromiumcode
| |
45 | |
40 private: | 46 private: |
47 void DestructOnAudioThread(); | |
48 | |
49 // Listens for output device changes. | |
50 base::Closure listener_cb_; | |
51 scoped_ptr<AudioDeviceListenerMac> output_device_listener_; | |
52 | |
41 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 53 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
42 }; | 54 }; |
43 | 55 |
44 } // namespace media | 56 } // namespace media |
45 | 57 |
46 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 58 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
OLD | NEW |