summaryrefslogtreecommitdiffstats
path: root/media/audio/mac/audio_manager_mac.cc
diff options
context:
space:
mode:
Diffstat (limited to 'media/audio/mac/audio_manager_mac.cc')
-rw-r--r--media/audio/mac/audio_manager_mac.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 7a8e15b..a921dfb 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -5,6 +5,7 @@
#include <CoreAudio/AudioHardware.h>
#include "base/at_exit.h"
+#include "media/audio/fake_audio_output_stream.h"
#include "media/audio/mac/audio_manager_mac.h"
#include "media/audio/mac/audio_output_mac.h"
@@ -19,8 +20,9 @@ bool AudioManagerMac::HasAudioDevices() {
AudioOutputStream* AudioManagerMac::MakeAudioStream(Format format, int channels,
int sample_rate,
char bits_per_sample) {
- // TODO(cpu): add mock format.
- if (format != AUDIO_PCM_LINEAR)
+ if (format == AUDIO_MOCK)
+ return FakeAudioOutputStream::MakeFakeStream();
+ else if (format != AUDIO_PCM_LINEAR)
return NULL;
return new PCMQueueOutAudioOutputStream(this, channels, sample_rate,
bits_per_sample);
@@ -34,19 +36,15 @@ void AudioManagerMac::UnMuteAll() {
// TODO(cpu): implement.
}
-const void* AudioManagerMac::GetLastMockBuffer() {
- // TODO(cpu): implement.
- return NULL;
-}
-
// Called by the stream when it has been released by calling Close().
void AudioManagerMac::ReleaseStream(PCMQueueOutAudioOutputStream* stream) {
delete stream;
}
namespace {
- AudioManagerMac* g_audio_manager = NULL;
-
+
+AudioManagerMac* g_audio_manager = NULL;
+
} // namespace.
void DestroyAudioManagerMac(void* param) {