summaryrefslogtreecommitdiffstats
path: root/media/audio/pulse
diff options
context:
space:
mode:
authorxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-01 12:15:18 +0000
committerxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-01 12:15:18 +0000
commit3ef4ffc6b9a9756b918e212bbcbf1376b45ef587 (patch)
tree1fa93f6a6c7177859d9f73a44e616b77a0302243 /media/audio/pulse
parent5f5030267c4f6489c5c74bb20151a1daced20e44 (diff)
downloadchromium_src-3ef4ffc6b9a9756b918e212bbcbf1376b45ef587.zip
chromium_src-3ef4ffc6b9a9756b918e212bbcbf1376b45ef587.tar.gz
chromium_src-3ef4ffc6b9a9756b918e212bbcbf1376b45ef587.tar.bz2
Prevent sending 0 as volume to AGC at the beginning of the audio stream.
We are using a timer and query the volume every 1 second, but since we don't have the correct volume at the beginning of the audio stream, we send 0 up to AGC, which will starting raising the volume from 0. This makes WebRtc audio barely usable since the volume is always set to around 0 at the beginning of the call. BUG=266048 TEST=Open http://webrtc.googlecode.com/svn/trunk/samples/js/demos/html/pc1.html, make a call, verity that the volume is not set to 0 at the beginning. Review URL: https://chromiumcodereview.appspot.com/21114004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/pulse')
-rw-r--r--media/audio/pulse/pulse_input.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/audio/pulse/pulse_input.cc b/media/audio/pulse/pulse_input.cc
index cc62085..54dfc1e 100644
--- a/media/audio/pulse/pulse_input.cc
+++ b/media/audio/pulse/pulse_input.cc
@@ -61,13 +61,15 @@ void PulseAudioInputStream::Start(AudioInputCallback* callback) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(callback);
DCHECK(handle_);
+
+ // AGC needs to be started out of the lock.
+ StartAgc();
+
AutoPulseLock auto_lock(pa_mainloop_);
if (stream_started_)
return;
- StartAgc();
-
// Clean up the old buffer.
pa_stream_drop(handle_);
buffer_->Clear();