#include "common_audio/wav_file.h"
#include <errno.h>
#include <algorithm>
#include <array>
#include <cstdio>
#include <type_traits>
#include <utility>
#include "common_audio/include/audio_util.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/arch.h"
namespace webrtc {
namespace {
static_assert …;
bool FormatSupported(WavFormat format) { … }
class WavHeaderFileReader : public WavHeaderReader { … };
constexpr size_t kMaxChunksize = …;
}
WavReader::WavReader(absl::string_view filename)
: … { … }
WavReader::WavReader(FileWrapper file) : … { … }
void WavReader::Reset() { … }
size_t WavReader::ReadSamples(const size_t num_samples,
int16_t* const samples) { … }
size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) { … }
void WavReader::Close() { … }
WavWriter::WavWriter(absl::string_view filename,
int sample_rate,
size_t num_channels,
SampleFormat sample_format)
: … { … }
WavWriter::WavWriter(FileWrapper file,
int sample_rate,
size_t num_channels,
SampleFormat sample_format)
: … { … }
void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) { … }
void WavWriter::WriteSamples(const float* samples, size_t num_samples) { … }
void WavWriter::Close() { … }
}