#ifndef MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
#define MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
#include <math.h>
#include <iterator>
#include <limits>
#include <memory>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "api/audio/audio_processing.h"
#include "common_audio/channel_buffer.h"
#include "common_audio/wav_file.h"
namespace webrtc {
static const AudioProcessing::Error kNoErr = …;
#define EXPECT_NOERR(expr) …
struct Int16FrameData { … };
class ChannelBufferWavReader final { … };
class ChannelBufferWavWriter final { … };
class ChannelBufferVectorWriter final { … };
FILE* OpenFile(absl::string_view filename, absl::string_view mode);
void SetFrameSampleRate(Int16FrameData* frame, int sample_rate_hz);
template <typename T>
void SetContainerFormat(int sample_rate_hz,
size_t num_channels,
Int16FrameData* frame,
std::unique_ptr<ChannelBuffer<T> >* cb) { … }
template <typename T>
float ComputeSNR(const T* ref, const T* test, size_t length, float* variance) { … }
}
#endif