Index: content/renderer/media/webrtc_audio_capturer.cc |
diff --git a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc |
index 822c13aea90d8552fdcddb93c49a78c9e2822976..f252fedd8273168e80a8bca59a0bae6195aea4de 100644 |
--- a/content/renderer/media/webrtc_audio_capturer.cc |
+++ b/content/renderer/media/webrtc_audio_capturer.cc |
@@ -104,7 +104,8 @@ scoped_refptr<WebRtcAudioCapturer> WebRtcAudioCapturer::CreateCapturer() { |
} |
void WebRtcAudioCapturer::Reconfigure(int sample_rate, |
- media::ChannelLayout channel_layout) { |
+ media::ChannelLayout channel_layout, |
+ const media::AudioParameters::PlatformEffects& effects) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
int buffer_size = GetBufferSize(sample_rate); |
DVLOG(1) << "Using WebRTC input buffer size: " << buffer_size; |
@@ -116,7 +117,7 @@ void WebRtcAudioCapturer::Reconfigure(int sample_rate, |
int bits_per_sample = 16; |
media::AudioParameters params(format, channel_layout, sample_rate, |
bits_per_sample, buffer_size); |
- |
+ params.SetPlatformEffects(effects); |
{ |
base::AutoLock auto_lock(lock_); |
params_ = params; |
@@ -128,13 +129,14 @@ void WebRtcAudioCapturer::Reconfigure(int sample_rate, |
} |
bool WebRtcAudioCapturer::Initialize(int render_view_id, |
tommi (sloooow) - chröme
2013/12/11 12:14:36
nit: move render_view_id on a new line as well
|
- media::ChannelLayout channel_layout, |
- int sample_rate, |
- int buffer_size, |
- int session_id, |
- const std::string& device_id, |
- int paired_output_sample_rate, |
- int paired_output_frames_per_buffer) { |
+ media::ChannelLayout channel_layout, |
+ int sample_rate, |
+ int buffer_size, |
+ int session_id, |
+ const std::string& device_id, |
+ int paired_output_sample_rate, |
+ int paired_output_frames_per_buffer, |
+ const media::AudioParameters::PlatformEffects& effects) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
DVLOG(1) << "WebRtcAudioCapturer::Initialize()"; |
@@ -200,7 +202,8 @@ bool WebRtcAudioCapturer::Initialize(int render_view_id, |
// providing an alternative media::AudioCapturerSource. |
SetCapturerSource(AudioDeviceFactory::NewInputDevice(render_view_id), |
channel_layout, |
- static_cast<float>(sample_rate)); |
+ static_cast<float>(sample_rate), |
+ effects); |
return true; |
} |
@@ -286,7 +289,8 @@ void WebRtcAudioCapturer::RemoveTrack(WebRtcLocalAudioTrack* track) { |
void WebRtcAudioCapturer::SetCapturerSource( |
const scoped_refptr<media::AudioCapturerSource>& source, |
media::ChannelLayout channel_layout, |
- float sample_rate) { |
+ float sample_rate, |
+ const media::AudioParameters::PlatformEffects& effects) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
DVLOG(1) << "SetCapturerSource(channel_layout=" << channel_layout << "," |
<< "sample_rate=" << sample_rate << ")"; |
@@ -312,7 +316,7 @@ void WebRtcAudioCapturer::SetCapturerSource( |
// Dispatch the new parameters both to the sink(s) and to the new source. |
// The idea is to get rid of any dependency of the microphone parameters |
// which would normally be used by default. |
- Reconfigure(sample_rate, channel_layout); |
+ Reconfigure(sample_rate, channel_layout, effects); |
// Make sure to grab the new parameters in case they were reconfigured. |
media::AudioParameters params = audio_parameters(); |
@@ -351,7 +355,8 @@ void WebRtcAudioCapturer::EnablePeerConnectionMode() { |
// WebRtc native buffer size. |
SetCapturerSource(AudioDeviceFactory::NewInputDevice(render_view_id), |
params.channel_layout(), |
- static_cast<float>(params.sample_rate())); |
+ static_cast<float>(params.sample_rate()), |
+ params.effects()); |
} |
void WebRtcAudioCapturer::Start() { |