AEC3: Adding another config parameter and matching json reader with config
This CL: -Adds another config parameter that controls the duration of the initial state. -Adds reading of that parameter in audioproc_f from the json settings file. -Adds missing reading of another parameter in audioproc_f from the json settings file. Bug: webrtc:8671 Change-Id: Ie6164c360492de5e6b0ade8838bbabe214560b5e Reviewed-on: https://webrtc-review.googlesource.com/94621 Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24360}
This commit is contained in:
@ -53,6 +53,7 @@ struct EchoCanceller3Config {
|
|||||||
ShadowConfiguration shadow_initial = {12, 0.9f, 20075344.f};
|
ShadowConfiguration shadow_initial = {12, 0.9f, 20075344.f};
|
||||||
|
|
||||||
size_t config_change_duration_blocks = 250;
|
size_t config_change_duration_blocks = 250;
|
||||||
|
float initial_state_seconds = 2.5f;
|
||||||
} filter;
|
} filter;
|
||||||
|
|
||||||
struct Erle {
|
struct Erle {
|
||||||
|
@ -284,8 +284,8 @@ void AecState::Update(
|
|||||||
|
|
||||||
// Flag whether the initial state is still active.
|
// Flag whether the initial state is still active.
|
||||||
if (use_short_initial_state_) {
|
if (use_short_initial_state_) {
|
||||||
initial_state_ =
|
initial_state_ = blocks_with_proper_filter_adaptation_ <
|
||||||
blocks_with_proper_filter_adaptation_ < 2.5f * kNumBlocksPerSecond;
|
config_.filter.initial_state_seconds * kNumBlocksPerSecond;
|
||||||
} else {
|
} else {
|
||||||
initial_state_ =
|
initial_state_ =
|
||||||
blocks_with_proper_filter_adaptation_ < 5 * kNumBlocksPerSecond;
|
blocks_with_proper_filter_adaptation_ < 5 * kNumBlocksPerSecond;
|
||||||
|
@ -210,6 +210,10 @@ EchoCanceller3Config ParseAec3Parameters(const std::string& filename) {
|
|||||||
ReadParam(section, "shadow", &cfg.filter.shadow);
|
ReadParam(section, "shadow", &cfg.filter.shadow);
|
||||||
ReadParam(section, "main_initial", &cfg.filter.main_initial);
|
ReadParam(section, "main_initial", &cfg.filter.main_initial);
|
||||||
ReadParam(section, "shadow_initial", &cfg.filter.shadow_initial);
|
ReadParam(section, "shadow_initial", &cfg.filter.shadow_initial);
|
||||||
|
ReadParam(section, "config_change_duration_blocks",
|
||||||
|
&cfg.filter.config_change_duration_blocks);
|
||||||
|
ReadParam(section, "initial_state_seconds",
|
||||||
|
&cfg.filter.initial_state_seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc::GetValueFromJsonObject(root, "erle", §ion)) {
|
if (rtc::GetValueFromJsonObject(root, "erle", §ion)) {
|
||||||
|
Reference in New Issue
Block a user