chromium/third_party/webrtc/modules/audio_processing/agc2/fixed_digital_level_estimator_unittest.cc

/*
 *  Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#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 =;

// Run audio at specified settings through the level estimator, and
// verify that the output level falls within the bounds.
void TestLevelEstimator(size_t samples_per_channel,
                        int num_channels,
                        float input_level_linear_scale,
                        float expected_min,
                        float expected_max) {}

// Returns time it takes for the level estimator to decrease its level
// estimate by 'level_reduction_db'.
float TimeMsToDecreaseLevel(size_t samples_per_channel,
                            int num_channels,
                            float input_level_db,
                            float level_reduction_db) {}
}  // namespace

TEST(GainController2FixedDigitalLevelEstimator, EstimatorShouldNotCrash) {}

TEST(GainController2FixedDigitalLevelEstimator,
     EstimatorShouldEstimateConstantLevel) {}

TEST(GainController2FixedDigitalLevelEstimator,
     EstimatorShouldEstimateConstantLevelForManyChannels) {}

TEST(GainController2FixedDigitalLevelEstimator, TimeToDecreaseForLowLevel) {}

TEST(GainController2FixedDigitalLevelEstimator,
     TimeToDecreaseForFullScaleLevel) {}

TEST(GainController2FixedDigitalLevelEstimator,
     TimeToDecreaseForMultipleChannels) {}

}  // namespace webrtc