NetEq: Remove background noise fill during long expansions

NetEq was (up until this CL) capable of fading over to generating a
constant background noise when voice expansion had lasted too long.
However, the code has for a really long time only ever used the "off"
mode, which meant that long expansions are faded down to complete
silence (only zeros), i.e., background noise fill was not used.
Removing the other two modes ("on" and "fade") simplifies the code.

Bug: webrtc:9180
Change-Id: Ia2d46960208f3d75c9659ad3f027c52e5ecfb6b0
Reviewed-on: https://webrtc-review.googlesource.com/71485
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22969}
This commit is contained in:
Henrik Lundin
2018-04-20 15:34:48 +02:00
committed by Commit Bot
parent 6e396b0188
commit 6719017d19
8 changed files with 7 additions and 111 deletions

View File

@ -101,7 +101,6 @@ NetEqImpl::NetEqImpl(const NetEq::Config& config,
reset_decoder_(false),
ssrc_(0),
first_packet_(true),
background_noise_mode_(config.background_noise_mode),
playout_mode_(config.playout_mode),
enable_fast_accelerate_(config.enable_fast_accelerate),
nack_enabled_(false),
@ -2088,7 +2087,6 @@ void NetEqImpl::SetSampleRateAndChannels(int fs_hz, size_t channels) {
// Delete BackgroundNoise object and create a new one.
background_noise_.reset(new BackgroundNoise(channels));
background_noise_->set_mode(background_noise_mode_);
// Reset random vector.
random_vector_.Reset();