#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/speech/audio_buffer.h"
#include "base/check_op.h"
AudioChunk::AudioChunk(int bytes_per_sample)
: … { … }
AudioChunk::AudioChunk(size_t length, int bytes_per_sample)
: … { … }
AudioChunk::AudioChunk(const uint8_t* data, size_t length, int bytes_per_sample)
: … { … }
bool AudioChunk::IsEmpty() const { … }
size_t AudioChunk::NumSamples() const { … }
const std::string& AudioChunk::AsString() const { … }
int16_t AudioChunk::GetSample16(size_t index) const { … }
const int16_t* AudioChunk::SamplesData16() const { … }
AudioBuffer::AudioBuffer(int bytes_per_sample)
: … { … }
AudioBuffer::~AudioBuffer() { … }
void AudioBuffer::Enqueue(const uint8_t* data, size_t length) { … }
scoped_refptr<AudioChunk> AudioBuffer::DequeueSingleChunk() { … }
scoped_refptr<AudioChunk> AudioBuffer::DequeueAll() { … }
void AudioBuffer::Clear() { … }
bool AudioBuffer::IsEmpty() const { … }