#include "media/base/audio_buffer_converter.h"
#include <stdint.h>
#include <memory>
#include "media/base/audio_buffer.h"
#include "media/base/sinc_resampler.h"
#include "media/base/test_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
const int kOutFrameSize = …;
const int kOutSampleRate = …;
constexpr ChannelLayout kOutChannelLayout = …;
const int kOutChannelCount = …;
static scoped_refptr<AudioBuffer> MakeTestBuffer(int sample_rate,
ChannelLayout channel_layout,
int channel_count,
int frames) { … }
class AudioBufferConverterTest : public ::testing::Test { … };
TEST_F(AudioBufferConverterTest, PassThrough) { … }
TEST_F(AudioBufferConverterTest, Downsample) { … }
TEST_F(AudioBufferConverterTest, Upsample) { … }
TEST_F(AudioBufferConverterTest, Resample_TinyBuffer) { … }
TEST_F(AudioBufferConverterTest, Resample_DifferingBufferSizes) { … }
TEST_F(AudioBufferConverterTest, ChannelDownmix) { … }
TEST_F(AudioBufferConverterTest, ChannelUpmix) { … }
TEST_F(AudioBufferConverterTest, ResampleAndRemix) { … }
TEST_F(AudioBufferConverterTest, ConfigChange_SampleRate) { … }
TEST_F(AudioBufferConverterTest, ConfigChange_ChannelLayout) { … }
TEST_F(AudioBufferConverterTest, ConfigChange_SampleRateAndChannelLayout) { … }
TEST_F(AudioBufferConverterTest, ConfigChange_Multiple) { … }
TEST_F(AudioBufferConverterTest, Reset) { … }
TEST_F(AudioBufferConverterTest, ResampleThenReset) { … }
TEST_F(AudioBufferConverterTest, ResetThenConvert) { … }
TEST_F(AudioBufferConverterTest, DiscreteChannelLayout) { … }
TEST_F(AudioBufferConverterTest, LargeBuffersResampling) { … }
}