| Index: media/audio/mac/audio_manager_mac.cc
|
| ===================================================================
|
| --- media/audio/mac/audio_manager_mac.cc (revision 20503)
|
| +++ media/audio/mac/audio_manager_mac.cc (working copy)
|
| @@ -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 @@
|
| 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 @@
|
| // 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) {
|
|
|