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

Unified Diff: content/renderer/media/audio_message_filter.cc

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 months 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/renderer/media/audio_message_filter.cc
===================================================================
--- content/renderer/media/audio_message_filter.cc (revision 187648)
+++ content/renderer/media/audio_message_filter.cc (working copy)
@@ -172,7 +172,22 @@
if (!audio_hardware_config_)
return;
- audio_hardware_config_->UpdateOutputConfig(new_buffer_size, new_sample_rate);
+ // TODO(crogers): fix OnOutputDeviceChanged() to pass AudioParameters.
+ media::ChannelLayout channel_layout =
+ audio_hardware_config_->GetOutputChannelLayout();
+ int channels = audio_hardware_config_->GetOutputChannels();
+
+ media::AudioParameters output_params;
+ output_params.Reset(
+ media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
+ channel_layout,
+ channels,
+ 0,
+ new_sample_rate,
+ 16,
+ new_buffer_size);
+
+ audio_hardware_config_->UpdateOutputConfig(output_params);
}
void AudioMessageFilter::SetAudioHardwareConfig(

Powered by Google App Engine
This is Rietveld 408576698