Only adapt AGC when the desired signal is present

Take the 50% quantile of the mask and compare it to certain threshold to determine if the desired signal is present. A hold is applied to avoid fast switching between states.
is_signal_present_ has been plotted and looks as expected. The AGC adaptation sounds promising, specially for the cases when the speaker fades in and out from the beam direction.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/28329005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8078 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
aluebs@webrtc.org
2015-01-15 18:07:21 +00:00
parent 3e42a8a56a
commit d82f55d2a7
10 changed files with 310 additions and 115 deletions

View File

@ -24,6 +24,7 @@ struct AecCore;
namespace webrtc {
class AudioFrame;
class Beamformer;
class EchoCancellation;
class EchoControlMobile;
class GainControl;
@ -199,6 +200,8 @@ class AudioProcessing {
static AudioProcessing* Create();
// Allows passing in an optional configuration at create-time.
static AudioProcessing* Create(const Config& config);
// Only for testing.
static AudioProcessing* Create(const Config& config, Beamformer* beamformer);
virtual ~AudioProcessing() {}
// Initializes internal states, while retaining all user settings. This