#include "modules/audio_processing/agc2/noise_level_estimator.h"
#include <array>
#include <cmath>
#include <functional>
#include <limits>
#include "api/audio/audio_view.h"
#include "api/function_view.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 int kNumIterations = …;
constexpr int kFramesPerSecond = …;
float RunEstimator(rtc::FunctionView<float()> sample_generator,
NoiseLevelEstimator& estimator,
int sample_rate_hz) { … }
class NoiseEstimatorParametrization : public ::testing::TestWithParam<int> { … };
TEST_P(NoiseEstimatorParametrization, NoiseFloorEstimatorWithRandomNoise) { … }
TEST_P(NoiseEstimatorParametrization, NoiseFloorEstimatorWithSineTone) { … }
TEST_P(NoiseEstimatorParametrization, NoiseFloorEstimatorWithPulseTone) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}