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 ff4ecc71cb1617fb102b6cf6e5c6ceda5844d622..263efaef228a27b6aaf5eb76bb3e5eae418ec3f4 100644 |
--- a/content/renderer/media/webrtc_audio_capturer.cc |
+++ b/content/renderer/media/webrtc_audio_capturer.cc |
@@ -478,16 +478,20 @@ void WebRtcAudioCapturer::Capture(media::AudioBus* audio_source, |
// Process and consume the data in the processor until there is not enough |
// data in the processor. |
int16* output = NULL; |
+ int new_volume = 0; |
while (audio_processor->ProcessAndConsumeData( |
- audio_delay, current_volume, key_pressed, &output)) { |
+ audio_delay, current_volume, key_pressed, &new_volume, &output)) { |
// Feed the post-processed data to the tracks. |
for (TrackList::ItemList::const_iterator it = tracks.begin(); |
it != tracks.end(); ++it) { |
(*it)->Capture(output, audio_delay, current_volume, key_pressed, |
need_audio_processing); |
} |
- // TODO(xians): Apply the new volume after AGC is working with the |
- // MediaStreamAudioProcessor. |
+ |
+ // TODO(xians): Check with ajm@ if we should set curret_volume to |
tommi (sloooow) - chröme
2014/01/21 15:06:20
current_volume
no longer working on chromium
2014/01/23 12:46:08
comment was removed.
|
+ // new_volume to avoid setting the volume twice. |
ajm
2014/01/22 21:50:55
Yes, you should update current_volume.
no longer working on chromium
2014/01/23 12:46:08
Done.
|
+ if (new_volume) |
+ SetVolume(new_volume); |
} |
} |