OLD | NEW |
1 // Copyright (c) 2009 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_io.h" | 9 #include "media/audio/audio_io.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 HasAudioOutputDevices(); | 21 virtual bool HasAudioOutputDevices(); |
| 22 virtual bool HasAudioInputDevices(); |
22 virtual AudioOutputStream* MakeAudioOutputStream(Format format, int channels, | 23 virtual AudioOutputStream* MakeAudioOutputStream(Format format, int channels, |
23 int sample_rate, | 24 int sample_rate, |
24 char bits_per_sample); | 25 char bits_per_sample); |
| 26 virtual AudioInputStream* MakeAudioInputStream(Format format, int channels, |
| 27 int sample_rate, |
| 28 char bits_per_sample, |
| 29 uint32 samples_per_packet); |
25 virtual void MuteAll(); | 30 virtual void MuteAll(); |
26 virtual void UnMuteAll(); | 31 virtual void UnMuteAll(); |
27 | 32 |
28 // Mac-only method to free a stream created in MakeAudioStream. | 33 // Mac-only method to free a stream created in MakeAudioStream. |
29 // It is called internally by the audio stream when it has been closed. | 34 // It is called internally by the audio stream when it has been closed. |
30 void ReleaseOutputStream(PCMQueueOutAudioOutputStream* stream); | 35 void ReleaseOutputStream(PCMQueueOutAudioOutputStream* stream); |
31 | 36 |
32 private: | 37 private: |
33 friend void DestroyAudioManagerMac(void*); | 38 friend void DestroyAudioManagerMac(void*); |
34 virtual ~AudioManagerMac() {}; | 39 virtual ~AudioManagerMac() {}; |
35 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 40 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
36 }; | 41 }; |
37 | 42 |
38 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 43 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
OLD | NEW |