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

Unified Diff: content/renderer/media/webrtc_audio_capturer.cc.rej

Issue 12102004: Renderer side audio device change wip... Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | content/renderer/media/webrtc_audio_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_audio_capturer.cc.rej
diff --git a/content/renderer/media/webrtc_audio_capturer.cc.rej b/content/renderer/media/webrtc_audio_capturer.cc.rej
new file mode 100644
index 0000000000000000000000000000000000000000..11592bfbcbbd0639e9b05266e1e8d5d7f866f81e
--- /dev/null
+++ b/content/renderer/media/webrtc_audio_capturer.cc.rej
@@ -0,0 +1,27 @@
+diff a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc (rejected hunks)
+@@ -173,10 +174,14 @@ void WebRtcAudioCapturer::ResumeBuffering() {
+
+ bool WebRtcAudioCapturer::Initialize() {
+ DVLOG(1) << "WebRtcAudioCapturer::Initialize()";
++
++ RendererAudioHardwareConfig* hardware_config =
++ RenderThreadImpl::current()->GetAudioHardwareConfig();
++
+ // Ask the browser for the default audio input hardware sample-rate.
+ // This request is based on a synchronous IPC message.
+ // TODO(xians): we should ask for the native sample rate of a specific device.
+- int sample_rate = GetAudioInputSampleRate();
++ int sample_rate = hardware_config->GetInputSampleRate();
+ DVLOG(1) << "Audio input hardware sample rate: " << sample_rate;
+ UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioInputSampleRate",
+ sample_rate, media::kUnexpectedAudioSampleRate);
+@@ -194,7 +199,8 @@ bool WebRtcAudioCapturer::Initialize() {
+ // Ask the browser for the default number of audio input channels.
+ // This request is based on a synchronous IPC message.
+ // TODO(xians): we should ask for the layout of a specific device.
+- media::ChannelLayout channel_layout = GetAudioInputChannelLayout();
++ media::ChannelLayout channel_layout =
++ hardware_config->GetInputChannelLayout();
+ DVLOG(1) << "Audio input hardware channels: " << channel_layout;
+
+ media::AudioParameters::Format format =
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | content/renderer/media/webrtc_audio_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698