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

Unified Diff: content/renderer/media/webrtc_audio_renderer.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/webrtc_audio_renderer.cc
===================================================================
--- content/renderer/media/webrtc_audio_renderer.cc (revision 187648)
+++ content/renderer/media/webrtc_audio_renderer.cc (working copy)
@@ -158,8 +158,10 @@
return false;
}
+ int channels = ChannelLayoutToChannelCount(channel_layout);
source_params.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
- channel_layout, 0, sample_rate, 16, buffer_size);
+ channel_layout, channels, 0,
+ sample_rate, 16, buffer_size);
// Set up audio parameters for the sink, i.e., the native audio output stream.
// We strive to open up using native parameters to achieve best possible
@@ -171,7 +173,7 @@
buffer_size = hardware_config->GetOutputBufferSize();
sink_params.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
- channel_layout, 0, sample_rate, 16, buffer_size);
+ channel_layout, channels, 0, sample_rate, 16, buffer_size);
// Create a FIFO if re-buffering is required to match the source input with
// the sink request. The source acts as provider here and the sink as

Powered by Google App Engine
This is Rietveld 408576698