33 AudioBuffer(uint32_t frame_size, uint32_t channels, std::span<float> buffer);
85 uint32_t channel_count_;
86 std::span<float> buffer_;
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:18
AudioBuffer GetChannelBuffer(uint32_t channel) const
Returns an AudioBuffer object representing the audio data for a specific channel.
uint32_t SampleCount() const
Returns the number of samples in one channel of the audio buffer.
AudioBuffer(std::span< float > buffer)
Constructs a mono audio buffer.
const float * Data() const
Provides direct access to the audio data.
uint32_t ChannelCount() const
Returns the number of channels in the audio buffer.
AudioBuffer()
Constructs an empty audio buffer.
std::span< float > GetChannelSpan(uint32_t channel)
Returns a span representing the audio data for a specific channel.
float * Data()
Provides direct access to the audio data.
std::span< const float > GetChannelSpan(uint32_t channel) const
Returns a span representing the audio data for a specific channel.
AudioBuffer(uint32_t frame_size, uint32_t channels, std::span< float > buffer)
Constructs a multi-channel audio buffer.
AudioBuffer Offset(uint32_t offset, uint32_t frame_size) const
Returns a new AudioBuffer where every channel is offset by a certain number of samples.