| Index: media/audio/pulse/pulse_input.cc
|
| diff --git a/media/audio/pulse/pulse_input.cc b/media/audio/pulse/pulse_input.cc
|
| index 4e48e10ec442d611bdcc2b5e67d78743aaa79780..c365c47b1bc6dbcb94bda31a9ee539eb07c85dca 100644
|
| --- a/media/audio/pulse/pulse_input.cc
|
| +++ b/media/audio/pulse/pulse_input.cc
|
| @@ -66,6 +66,8 @@ void PulseAudioInputStream::Start(AudioInputCallback* callback) {
|
| if (stream_started_)
|
| return;
|
|
|
| + StartAgc();
|
| +
|
| // Clean up the old buffer.
|
| pa_stream_drop(handle_);
|
| buffer_->Clear();
|
| @@ -86,6 +88,8 @@ void PulseAudioInputStream::Stop() {
|
| if (!stream_started_)
|
| return;
|
|
|
| + StopAgc();
|
| +
|
| // Set the flag to false to stop filling new data to soundcard.
|
| stream_started_ = false;
|
|
|
| @@ -246,11 +250,10 @@ void PulseAudioInputStream::ReadData() {
|
| // Update the AGC volume level once every second. Note that,
|
| // |volume| is also updated each time SetVolume() is called
|
| // through IPC by the render-side AGC.
|
| - // QueryAgcVolume() will trigger a callback to asynchronously update the
|
| - // |volume_|, we disregard the |normalized_volume| from QueryAgcVolume()
|
| + // We disregard the |normalized_volume| from GetAgcVolume()
|
| // and use the value calculated by |volume_|.
|
| double normalized_volume = 0.0;
|
| - QueryAgcVolume(&normalized_volume);
|
| + GetAgcVolume(&normalized_volume);
|
| normalized_volume = volume_ / GetMaxVolume();
|
|
|
| do {
|
|
|