OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_output.h" | 9 #include "media/audio/audio_output.h" |
10 | 10 |
11 class PCMQueueOutAudioOutputStream; | 11 class PCMQueueOutAudioOutputStream; |
12 | 12 |
13 // Mac OS X implementation of the AudioManager singleton. This class is internal | 13 // Mac OS X implementation of the AudioManager singleton. This class is internal |
14 // to the audio output and only internal users can call methods not exposed by | 14 // to the audio output and only internal users can call methods not exposed by |
15 // the AudioManager class. | 15 // the AudioManager class. |
16 class AudioManagerMac : public AudioManager { | 16 class AudioManagerMac : public AudioManager { |
17 public: | 17 public: |
18 AudioManagerMac() {}; | 18 AudioManagerMac() {}; |
19 | 19 |
20 // Implementation of AudioManager. | 20 // Implementation of AudioManager. |
21 virtual bool HasAudioDevices(); | 21 virtual bool HasAudioDevices(); |
22 virtual AudioOutputStream* MakeAudioStream(Format format, int channels, | 22 virtual AudioOutputStream* MakeAudioStream(Format format, int channels, |
23 int sample_rate, | 23 int sample_rate, |
24 char bits_per_sample); | 24 char bits_per_sample); |
25 virtual void MuteAll(); | 25 virtual void MuteAll(); |
26 virtual void UnMuteAll(); | 26 virtual void UnMuteAll(); |
27 virtual const void* GetLastMockBuffer(); | |
28 | 27 |
29 // Mac-only method to free a stream created in MakeAudioStream. | 28 // Mac-only method to free a stream created in MakeAudioStream. |
30 // It is called internally by the audio stream when it has been closed. | 29 // It is called internally by the audio stream when it has been closed. |
31 void ReleaseStream(PCMQueueOutAudioOutputStream* stream); | 30 void ReleaseStream(PCMQueueOutAudioOutputStream* stream); |
32 | 31 |
33 private: | 32 private: |
34 friend void DestroyAudioManagerMac(void*); | 33 friend void DestroyAudioManagerMac(void*); |
35 virtual ~AudioManagerMac() {}; | 34 virtual ~AudioManagerMac() {}; |
36 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 35 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
37 }; | 36 }; |
38 | 37 |
39 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 38 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
OLD | NEW |