API add to set background noise mode.
Background noise mode. BUG= R=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2194005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4835 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -294,8 +294,8 @@ int Expand::Process(AudioMultiVector<int16_t>* output) {
|
||||
|
||||
// Unmute the background noise.
|
||||
int16_t bgn_mute_factor = background_noise_->MuteFactor(channel_ix);
|
||||
BackgroundNoise::BackgroundNoiseMode bgn_mode = background_noise_->mode();
|
||||
if (bgn_mode == BackgroundNoise::kBgnFade &&
|
||||
NetEqBackgroundNoiseMode bgn_mode = background_noise_->mode();
|
||||
if (bgn_mode == kBgnFade &&
|
||||
consecutive_expands_ >= kMaxConsecutiveExpands &&
|
||||
bgn_mute_factor > 0) {
|
||||
// Fade BGN to zero.
|
||||
@ -317,8 +317,8 @@ int Expand::Process(AudioMultiVector<int16_t>* output) {
|
||||
} else if (bgn_mute_factor < 16384) {
|
||||
// If mode is kBgnOff, or if kBgnFade has started fading,
|
||||
// Use regular |mute_slope|.
|
||||
if (!stop_muting_ && bgn_mode != BackgroundNoise::kBgnOff &&
|
||||
!(bgn_mode == BackgroundNoise::kBgnFade &&
|
||||
if (!stop_muting_ && bgn_mode != kBgnOff &&
|
||||
!(bgn_mode == kBgnFade &&
|
||||
consecutive_expands_ >= kMaxConsecutiveExpands)) {
|
||||
DspHelper::UnmuteSignal(noise_vector, static_cast<int>(current_lag),
|
||||
&bgn_mute_factor, parameters.mute_slope,
|
||||
|
||||
Reference in New Issue
Block a user