#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/base/multi_channel_resampler.h"
#include <algorithm>
#include <memory>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "media/base/audio_bus.h"
namespace media {
MultiChannelResampler::MultiChannelResampler(int channels,
double io_sample_rate_ratio,
size_t request_size,
const ReadCB read_cb)
: … { … }
MultiChannelResampler::~MultiChannelResampler() = default;
void MultiChannelResampler::Resample(int frames, AudioBus* audio_bus) { … }
void MultiChannelResampler::ProvideInput(int channel,
int frames,
float* destination) { … }
void MultiChannelResampler::Flush() { … }
void MultiChannelResampler::SetRatio(double io_sample_rate_ratio) { … }
int MultiChannelResampler::ChunkSize() const { … }
int MultiChannelResampler::GetMaxInputFramesRequested(
int output_frames_requested) const { … }
double MultiChannelResampler::BufferedFrames() const { … }
void MultiChannelResampler::PrimeWithSilence() { … }
int MultiChannelResampler::KernelSize() const { … }
}