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 int samples_per_packet); | |
27 virtual void MuteAll(); | 26 virtual void MuteAll(); |
28 virtual void UnMuteAll(); | 27 virtual void UnMuteAll(); |
29 | 28 |
30 // Mac-only method to free the streams created by above facoty methods. | 29 // Mac-only method to free the streams created by above facoty methods. |
31 // They are called internally by the respective audio stream when it has | 30 // They are called internally by the respective audio stream when it has |
32 // been closed. | 31 // been closed. |
33 void ReleaseOutputStream(PCMQueueOutAudioOutputStream* stream); | 32 void ReleaseOutputStream(PCMQueueOutAudioOutputStream* stream); |
34 void ReleaseInputStream(PCMQueueInAudioInputStream* stream); | 33 void ReleaseInputStream(PCMQueueInAudioInputStream* stream); |
35 | 34 |
36 private: | 35 private: |
37 friend void DestroyAudioManagerMac(void*); | 36 friend void DestroyAudioManagerMac(void*); |
38 virtual ~AudioManagerMac() {}; | 37 virtual ~AudioManagerMac() {}; |
39 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 38 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
40 }; | 39 }; |
41 | 40 |
42 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 41 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
OLD | NEW |