Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: content/browser/renderer_host/media/audio_sync_reader.cc

Issue 2466463005: Support (E)AC3 passthrough
Patch Set: Improve CastMediaClient::IsSupportedPassthroughAudio() Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698