Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_AUDIO_MANAGER_BASE_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| 11 #include "media/audio/audio_manager.h" | 11 #include "media/audio/audio_manager.h" |
| 12 | 12 |
| 13 class AudioOutputDispatcher; | 13 class AudioOutputDispatcher; |
| 14 | 14 |
| 15 // AudioManagerBase provides AudioManager functions common for all platforms. | 15 // AudioManagerBase provides AudioManager functions common for all platforms. |
| 16 class AudioManagerBase : public AudioManager { | 16 class AudioManagerBase : public AudioManager { |
| 17 public: | 17 public: |
| 18 // Name of the generic "default" device. | |
| 19 static const char kDefaultDeviceName[]; | |
|
awong
2011/05/23 17:36:15
"default" isn't cross platform...is the AudioManag
xians
2011/05/23 20:15:59
Sorry, I should have written more comments here.
I
| |
| 20 | |
| 18 AudioManagerBase(); | 21 AudioManagerBase(); |
| 19 | 22 |
| 20 virtual void Init(); | 23 virtual void Init(); |
| 21 virtual void Cleanup(); | 24 virtual void Cleanup(); |
| 22 | 25 |
| 23 virtual MessageLoop* GetMessageLoop(); | 26 virtual MessageLoop* GetMessageLoop(); |
| 24 | 27 |
| 25 virtual string16 GetAudioInputDeviceModel(); | 28 virtual string16 GetAudioInputDeviceModel(); |
| 26 | 29 |
| 27 virtual bool CanShowAudioInputSettings(); | 30 virtual bool CanShowAudioInputSettings(); |
| 28 virtual void ShowAudioInputSettings(); | 31 virtual void ShowAudioInputSettings(); |
| 29 | 32 |
| 33 virtual void GetAudioInputDeviceNames(AudioInputDeviceNames* device_names); | |
| 34 | |
| 30 virtual AudioOutputStream* MakeAudioOutputStreamProxy( | 35 virtual AudioOutputStream* MakeAudioOutputStreamProxy( |
| 31 const AudioParameters& params); | 36 const AudioParameters& params); |
| 32 | 37 |
| 33 protected: | 38 protected: |
| 34 virtual ~AudioManagerBase(); | 39 virtual ~AudioManagerBase(); |
| 35 | 40 |
| 36 typedef std::map<AudioParameters, scoped_refptr<AudioOutputDispatcher>, | 41 typedef std::map<AudioParameters, scoped_refptr<AudioOutputDispatcher>, |
| 37 AudioParameters::Compare> | 42 AudioParameters::Compare> |
| 38 AudioOutputDispatchersMap; | 43 AudioOutputDispatchersMap; |
| 39 | 44 |
| 40 bool initialized() { return initialized_; } | 45 bool initialized() { return initialized_; } |
| 41 | 46 |
| 42 // Thread used to interact with AudioOutputStreams created by this | 47 // Thread used to interact with AudioOutputStreams created by this |
| 43 // audio manger. | 48 // audio manger. |
| 44 base::Thread audio_thread_; | 49 base::Thread audio_thread_; |
| 45 | 50 |
| 46 bool initialized_; | 51 bool initialized_; |
| 47 | 52 |
| 48 AudioOutputDispatchersMap output_dispatchers_; | 53 AudioOutputDispatchersMap output_dispatchers_; |
| 49 | 54 |
| 50 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 55 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
| 51 }; | 56 }; |
| 52 | 57 |
| 53 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 58 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| OLD | NEW |