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

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

Issue 225143006: Limit the max volume to 255 before pass it to APM. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 8 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/media_stream_audio_processor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 482d25f1114b2479baabcda0d4fb930c4e5ba944..b1bb2741aa8616609a71d6cb573c7e56e3320a58 100644
--- a/content/renderer/media/webrtc_audio_capturer.cc
+++ b/content/renderer/media/webrtc_audio_capturer.cc
@@ -464,7 +464,7 @@ void WebRtcAudioCapturer::Capture(media::AudioBus* audio_source,
// webrtc::VoiceEngine. webrtc::VoiceEngine will handle the case when the
// volume is higher than 255.
ajm 2014/04/12 01:53:34 Update this comment, since VoiceEngine isn't handl
no longer working on chromium 2014/04/14 10:06:33 Done.
volume_ = static_cast<int>((volume * MaxVolume()) + 0.5);
- current_volume = volume_;
+ current_volume = volume_ > MaxVolume() ? MaxVolume() : volume_;
audio_delay = base::TimeDelta::FromMilliseconds(audio_delay_milliseconds);
audio_delay_ = audio_delay;
key_pressed_ = key_pressed;
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698