Index: content/browser/renderer_host/media/audio_sync_reader.cc |
diff --git a/content/browser/renderer_host/media/audio_sync_reader.cc b/content/browser/renderer_host/media/audio_sync_reader.cc |
index 6299aaf7e665b038956893ef87a562dac5a623af..2b3fd17c7f81b07f0bad56a3448dc8da2a2fd7cb 100644 |
--- a/content/browser/renderer_host/media/audio_sync_reader.cc |
+++ b/content/browser/renderer_host/media/audio_sync_reader.cc |
@@ -71,6 +71,7 @@ AudioSyncReader::AudioSyncReader( |
reinterpret_cast<AudioOutputBuffer*>(shared_memory_->memory()); |
output_bus_ = AudioBus::WrapMemory(params, buffer->audio); |
output_bus_->Zero(); |
+ output_bus_->set_is_raw_format(params.IsRawFormat()); |
} |
AudioSyncReader::~AudioSyncReader() { |
@@ -176,8 +177,15 @@ void AudioSyncReader::Read(AudioBus* dest) { |
if (mute_audio_) |
dest->Zero(); |
- else |
+ else { |
+ if (output_bus_->is_raw_format()) { |
+ AudioOutputBuffer* buffer = |
+ reinterpret_cast<AudioOutputBuffer*>(shared_memory_->memory()); |
+ output_bus_->set_frames(buffer->params.frames); |
+ output_bus_->set_data_size(buffer->params.data_size); |
+ } |
output_bus_->CopyTo(dest); |
+ } |
} |
void AudioSyncReader::Close() { |