OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "media/audio/audio_manager_base.h" | 10 #include "media/audio/audio_manager_base.h" |
11 | 11 |
12 class PCMQueueInAudioInputStream; | 12 class PCMQueueInAudioInputStream; |
13 class PCMQueueOutAudioOutputStream; | 13 class PCMQueueOutAudioOutputStream; |
14 | 14 |
15 // Mac OS X implementation of the AudioManager singleton. This class is internal | 15 // Mac OS X implementation of the AudioManager singleton. This class is internal |
16 // to the audio output and only internal users can call methods not exposed by | 16 // to the audio output and only internal users can call methods not exposed by |
17 // the AudioManager class. | 17 // the AudioManager class. |
18 class AudioManagerMac : public AudioManagerBase { | 18 class AudioManagerMac : public AudioManagerBase { |
19 public: | 19 public: |
20 AudioManagerMac(); | 20 AudioManagerMac(); |
21 | 21 |
22 // Implementation of AudioManager. | 22 // Implementation of AudioManager. |
23 virtual bool HasAudioOutputDevices() OVERRIDE; | 23 virtual bool HasAudioOutputDevices() OVERRIDE; |
24 virtual bool HasAudioInputDevices() OVERRIDE; | 24 virtual bool HasAudioInputDevices() OVERRIDE; |
25 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) | 25 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) |
26 OVERRIDE; | 26 OVERRIDE; |
27 virtual AudioOutputStream* MakeAudioOutputStream( | 27 virtual AudioOutputStream* MakeAudioOutputStream( |
28 const AudioParameters& params) OVERRIDE; | 28 const AudioParameters& params) OVERRIDE; |
29 virtual AudioInputStream* MakeAudioInputStream( | 29 virtual AudioInputStream* MakeAudioInputStream( |
30 const AudioParameters& params) OVERRIDE; | 30 const AudioParameters& params, const std::string& device_uid) OVERRIDE; |
31 virtual void MuteAll() OVERRIDE; | 31 virtual void MuteAll() OVERRIDE; |
32 virtual void UnMuteAll() OVERRIDE; | 32 virtual void UnMuteAll() OVERRIDE; |
33 | 33 |
34 // Mac-only method to free the streams created by above facoty methods. | 34 // Mac-only method to free the streams created by above facoty methods. |
35 // They are called internally by the respective audio stream when it has | 35 // They are called internally by the respective audio stream when it has |
36 // been closed. | 36 // been closed. |
37 void ReleaseOutputStream(AudioOutputStream* stream); | 37 void ReleaseOutputStream(AudioOutputStream* stream); |
38 void ReleaseInputStream(AudioInputStream* stream); | 38 void ReleaseInputStream(AudioInputStream* stream); |
39 | 39 |
40 private: | 40 private: |
41 virtual ~AudioManagerMac(); | 41 virtual ~AudioManagerMac(); |
42 | 42 |
43 // Number of currently open output streams. | 43 // Number of currently open output streams. |
44 size_t num_output_streams_; | 44 size_t num_output_streams_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 46 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
47 }; | 47 }; |
48 | 48 |
49 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 49 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
OLD | NEW |