Delete voice_detection() pointer to submodule
The new configuration path is via AudioProcessing::ApplyConfig and AudioProcessing::GetStatistics. ApmTest.Process passes with unchanged reference files if audio_processing_impl would initialize the VAD with VoiceDetection::kLowLikelihood instead of kVeryLowLikelihood. This was verified by testing this CL with that modification. Bug: webrtc:9878 Change-Id: I4d08df37a07e5c72feeec02a07d6b9435f917d72 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155445 Commit-Queue: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29395}
This commit is contained in:
committed by
Commit Bot
parent
24d251f796
commit
0824c6f61a
@ -455,6 +455,10 @@ void AudioProcessingSimulator::CreateAudioProcessor() {
|
||||
apm_config.high_pass_filter.enabled = *settings_.use_hpf;
|
||||
}
|
||||
|
||||
if (settings_.use_vad) {
|
||||
apm_config.voice_detection.enabled = *settings_.use_vad;
|
||||
}
|
||||
|
||||
if (settings_.use_refined_adaptive_filter) {
|
||||
config.Set<RefinedAdaptiveFilter>(
|
||||
new RefinedAdaptiveFilter(*settings_.use_refined_adaptive_filter));
|
||||
@ -502,10 +506,6 @@ void AudioProcessingSimulator::CreateAudioProcessor() {
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError,
|
||||
ap_->level_estimator()->Enable(*settings_.use_le));
|
||||
}
|
||||
if (settings_.use_vad) {
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError,
|
||||
ap_->voice_detection()->Enable(*settings_.use_vad));
|
||||
}
|
||||
if (settings_.use_agc_limiter) {
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError, ap_->gain_control()->enable_limiter(
|
||||
*settings_.use_agc_limiter));
|
||||
@ -526,13 +526,6 @@ void AudioProcessingSimulator::CreateAudioProcessor() {
|
||||
ap_->gain_control()->set_mode(
|
||||
static_cast<webrtc::GainControl::Mode>(*settings_.agc_mode)));
|
||||
}
|
||||
|
||||
if (settings_.vad_likelihood) {
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError,
|
||||
ap_->voice_detection()->set_likelihood(
|
||||
static_cast<webrtc::VoiceDetection::Likelihood>(
|
||||
*settings_.vad_likelihood)));
|
||||
}
|
||||
if (settings_.ns_level) {
|
||||
RTC_CHECK_EQ(
|
||||
AudioProcessing::kNoError,
|
||||
|
||||
Reference in New Issue
Block a user