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