#include "modules/audio_processing/agc2/fixed_digital_level_estimator.h"
#include <limits>
#include "api/audio/audio_frame.h"
#include "common_audio/include/audio_util.h"
#include "modules/audio_processing/agc2/agc2_common.h"
#include "modules/audio_processing/agc2/agc2_testing_common.h"
#include "modules/audio_processing/agc2/vector_float_frame.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/gunit.h"
namespace webrtc {
namespace {
constexpr float kInputLevel = …;
void TestLevelEstimator(size_t samples_per_channel,
int num_channels,
float input_level_linear_scale,
float expected_min,
float expected_max) { … }
float TimeMsToDecreaseLevel(size_t samples_per_channel,
int num_channels,
float input_level_db,
float level_reduction_db) { … }
}
TEST(GainController2FixedDigitalLevelEstimator, EstimatorShouldNotCrash) { … }
TEST(GainController2FixedDigitalLevelEstimator,
EstimatorShouldEstimateConstantLevel) { … }
TEST(GainController2FixedDigitalLevelEstimator,
EstimatorShouldEstimateConstantLevelForManyChannels) { … }
TEST(GainController2FixedDigitalLevelEstimator, TimeToDecreaseForLowLevel) { … }
TEST(GainController2FixedDigitalLevelEstimator,
TimeToDecreaseForFullScaleLevel) { … }
TEST(GainController2FixedDigitalLevelEstimator,
TimeToDecreaseForMultipleChannels) { … }
}