ACM/NetEq: Restructure how post-decode VAD is enabled
This change avoids calling neteq_->EnableVad() and DisableVad from the AcmReceiver constructor. Instead, the new member enable_post_decode_vad is added to NetEq's config struct. It is disabled by defualt, but ACM sets it to enabled. This preserves the behavior both of NetEq stand-alone (i.e., in tests) and of ACM. BUG=webrtc:3520 Review URL: https://codereview.webrtc.org/1425133002 Cr-Commit-Position: refs/heads/master@{#10476}
This commit is contained in:
committed by
Commit bot
parent
d56d68cd27
commit
9bc2667fa6
@ -112,6 +112,10 @@ NetEqImpl::NetEqImpl(const NetEq::Config& config,
|
||||
if (create_components) {
|
||||
SetSampleRateAndChannels(fs, 1); // Default is 1 channel.
|
||||
}
|
||||
RTC_DCHECK(!vad_->enabled());
|
||||
if (config.enable_post_decode_vad) {
|
||||
vad_->Enable();
|
||||
}
|
||||
}
|
||||
|
||||
NetEqImpl::~NetEqImpl() = default;
|
||||
|
||||
Reference in New Issue
Block a user