APM: remove unused field trial in AgcManagerDirect
The removed field trial was added in https://webrtc-review.googlesource.com/c/src/+/160708. Bug: webrtc:7494 Change-Id: I1abe51ea086342666a0420d5c10ddea87810aa26 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278781 Reviewed-by: Sam Zackrisson <saza@webrtc.org> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38366}
This commit is contained in:
parent
2235776597
commit
db955f0f13
@ -63,12 +63,6 @@ constexpr int kOverrideWaitFrames = 0;
|
|||||||
using AnalogAgcConfig =
|
using AnalogAgcConfig =
|
||||||
AudioProcessing::Config::GainController1::AnalogGainController;
|
AudioProcessing::Config::GainController1::AnalogGainController;
|
||||||
|
|
||||||
// Returns whether a fall-back solution to choose the maximum level should be
|
|
||||||
// chosen.
|
|
||||||
bool UseMaxAnalogChannelLevel() {
|
|
||||||
return field_trial::IsEnabled("WebRTC-UseMaxAnalogAgcChannelLevel");
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the "WebRTC-Audio-2ndAgcMinMicLevelExperiment" field trial is specified,
|
// If the "WebRTC-Audio-2ndAgcMinMicLevelExperiment" field trial is specified,
|
||||||
// parses it and returns a value between 0 and 255 depending on the field-trial
|
// parses it and returns a value between 0 and 255 depending on the field-trial
|
||||||
// string. Returns an unspecified value if the field trial is not specified, if
|
// string. Returns an unspecified value if the field trial is not specified, if
|
||||||
@ -486,7 +480,6 @@ AgcManagerDirect::AgcManagerDirect(int num_capture_channels,
|
|||||||
: analog_controller_enabled_(analog_config.enabled),
|
: analog_controller_enabled_(analog_config.enabled),
|
||||||
min_mic_level_override_(GetMinMicLevelOverride()),
|
min_mic_level_override_(GetMinMicLevelOverride()),
|
||||||
data_dumper_(new ApmDataDumper(instance_counter_.fetch_add(1) + 1)),
|
data_dumper_(new ApmDataDumper(instance_counter_.fetch_add(1) + 1)),
|
||||||
use_min_channel_level_(!UseMaxAnalogChannelLevel()),
|
|
||||||
num_capture_channels_(num_capture_channels),
|
num_capture_channels_(num_capture_channels),
|
||||||
disable_digital_adaptive_(!analog_config.enable_digital_adaptive),
|
disable_digital_adaptive_(!analog_config.enable_digital_adaptive),
|
||||||
frames_since_clipped_(analog_config.clipped_wait_frames),
|
frames_since_clipped_(analog_config.clipped_wait_frames),
|
||||||
@ -714,21 +707,11 @@ void AgcManagerDirect::AggregateChannelLevels() {
|
|||||||
int new_recommended_input_volume =
|
int new_recommended_input_volume =
|
||||||
channel_agcs_[0]->recommended_analog_level();
|
channel_agcs_[0]->recommended_analog_level();
|
||||||
channel_controlling_gain_ = 0;
|
channel_controlling_gain_ = 0;
|
||||||
if (use_min_channel_level_) {
|
for (size_t ch = 1; ch < channel_agcs_.size(); ++ch) {
|
||||||
for (size_t ch = 1; ch < channel_agcs_.size(); ++ch) {
|
int level = channel_agcs_[ch]->recommended_analog_level();
|
||||||
int level = channel_agcs_[ch]->recommended_analog_level();
|
if (level < new_recommended_input_volume) {
|
||||||
if (level < new_recommended_input_volume) {
|
new_recommended_input_volume = level;
|
||||||
new_recommended_input_volume = level;
|
channel_controlling_gain_ = static_cast<int>(ch);
|
||||||
channel_controlling_gain_ = static_cast<int>(ch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (size_t ch = 1; ch < channel_agcs_.size(); ++ch) {
|
|
||||||
int level = channel_agcs_[ch]->recommended_analog_level();
|
|
||||||
if (level > new_recommended_input_volume) {
|
|
||||||
new_recommended_input_volume = level;
|
|
||||||
channel_controlling_gain_ = static_cast<int>(ch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,6 @@ class AgcManagerDirect final {
|
|||||||
const absl::optional<int> min_mic_level_override_;
|
const absl::optional<int> min_mic_level_override_;
|
||||||
std::unique_ptr<ApmDataDumper> data_dumper_;
|
std::unique_ptr<ApmDataDumper> data_dumper_;
|
||||||
static std::atomic<int> instance_counter_;
|
static std::atomic<int> instance_counter_;
|
||||||
const bool use_min_channel_level_;
|
|
||||||
const int num_capture_channels_;
|
const int num_capture_channels_;
|
||||||
const bool disable_digital_adaptive_;
|
const bool disable_digital_adaptive_;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user