Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: webrtc/modules/audio_coding/main/acm2/acm_receiver.cc

Issue 1425133002: ACM/NetEq: Restructure how post-decode VAD is enabled (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@acm-recv-nack
Patch Set: Actually doing something with the new config Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/main/include/audio_coding_module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc b/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
index 80b7071f8d4aec9b3bb84aba94729324d9226c19..b50b122a00d18d06ca98c52ccf9707fc51717a40 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
@@ -128,7 +128,7 @@ AcmReceiver::AcmReceiver(const AudioCodingModule::Config& config)
audio_buffer_(new int16_t[AudioFrame::kMaxDataSizeSamples]),
last_audio_buffer_(new int16_t[AudioFrame::kMaxDataSizeSamples]),
neteq_(NetEq::Create(config.neteq_config)),
- vad_enabled_(true),
+ vad_enabled_(config.neteq_config.enable_post_decode_vad),
clock_(config.clock),
resampled_last_output_frame_(true),
av_sync_(false),
@@ -136,15 +136,6 @@ AcmReceiver::AcmReceiver(const AudioCodingModule::Config& config)
missing_packets_sync_stream_(),
late_packets_sync_stream_() {
assert(clock_);
-
- // Make sure we are on the same page as NetEq. Post-decode VAD is disabled by
- // default in NetEq4, however, Audio Conference Mixer relies on VAD decision
- // and fails if VAD decision is not provided.
- if (vad_enabled_)
- neteq_->EnableVad();
- else
- neteq_->DisableVad();
-
memset(audio_buffer_.get(), 0, AudioFrame::kMaxDataSizeSamples);
memset(last_audio_buffer_.get(), 0, AudioFrame::kMaxDataSizeSamples);
}
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/main/include/audio_coding_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698