Adding more refined control over choice of band-splitting

This CL allows the user to have more refined control over what band
splitting-scheme is used inside the audio processing module.


Bug: webrtc:6181
Change-Id: I236c3b1f96ab80cc4ffb8c39c045c034764567a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152480
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29189}
This commit is contained in:
Per Åhgren
2019-09-15 00:27:58 +02:00
committed by Commit Bot
parent ec06ebd25b
commit fcbe4071ce
7 changed files with 51 additions and 18 deletions

View File

@ -470,6 +470,11 @@ void AudioProcessingSimulator::CreateAudioProcessor() {
apm_config.residual_echo_detector.enabled = *settings_.use_ed;
}
if (settings_.maximum_internal_processing_rate) {
apm_config.pipeline.maximum_internal_processing_rate =
*settings_.maximum_internal_processing_rate;
}
RTC_CHECK(ap_builder_);
if (echo_control_factory) {
ap_builder_->SetEchoControlFactory(std::move(echo_control_factory));

View File

@ -81,6 +81,7 @@ struct SimulationSettings {
absl::optional<float> pre_amplifier_gain_factor;
absl::optional<int> vad_likelihood;
absl::optional<int> ns_level;
absl::optional<int> maximum_internal_processing_rate;
absl::optional<bool> use_refined_adaptive_filter;
int initial_mic_level;
bool simulate_mic_gain = false;

View File

@ -193,6 +193,11 @@ ABSL_FLAG(int,
ns_level,
kParameterNotSpecifiedValue,
"Specify the NS level (0-3)");
ABSL_FLAG(int,
maximum_internal_processing_rate,
kParameterNotSpecifiedValue,
"Set a maximum internal processing rate (32000 or 48000) to override "
"the default rate");
ABSL_FLAG(int,
stream_delay,
kParameterNotSpecifiedValue,
@ -417,6 +422,8 @@ SimulationSettings CreateSettings() {
SetSettingIfSpecified(absl::GetFlag(FLAGS_vad_likelihood),
&settings.vad_likelihood);
SetSettingIfSpecified(absl::GetFlag(FLAGS_ns_level), &settings.ns_level);
SetSettingIfSpecified(absl::GetFlag(FLAGS_maximum_internal_processing_rate),
&settings.maximum_internal_processing_rate);
SetSettingIfSpecified(absl::GetFlag(FLAGS_stream_delay),
&settings.stream_delay);
SetSettingIfFlagSet(absl::GetFlag(FLAGS_use_stream_delay),