A dynamically sizeable buffer to store non-interleaved audio, along with an array of pointers to the beginning of each channel.
More...
|
| | AudioBuffer () |
| | AudioBuffer (const size_t num_channels, const size_t num_frames) |
| | Constructs an audio buffer with the given number of channels and frames.
|
| | AudioBuffer (const size_t num_channels, const size_t num_frames, T value_to_fill_with) |
| | Constructs an audio buffer with the given number of channels and frames and fills it with given value.
|
| | AudioBuffer (const AudioBuffer &other) |
| | Constructs an audio buffer by copying from another buffer.
|
| | AudioBuffer (AudioBuffer &&other) noexcept |
| | Constructs an audio buffer by moving from another buffer.
|
| AudioBuffer & | operator= (const AudioBuffer &other) |
| | Copies the contents from another audio buffer to this buffer.
|
| AudioBuffer & | operator= (AudioBuffer &&other) noexcept |
| | Moves the contents from another audio buffer to this buffer.
|
| void | resize (size_t num_channels, const size_t num_frames) |
| | Prepares the audio buffer for the given number of channels and frames.
|
| | AudioBufferView (T *const *channels, const size_t num_channels, const size_t num_frames) |
| | Constructs an audio buffer view with the given channels, number of channels, and number of frames.
|
| size_t | num_channels () const |
| size_t | num_frames () const |
| const T * | operator[] (size_t channel_index) const |
| | Accesses the channel at the given index.
|
| T * | operator[] (size_t channel_index) |
| | Accesses the channel at the given index Does not perform bounds checking.
|
| const T *const * | data () const |
| T *const * | data () |
| void | set_sample (size_t channel_index, size_t frame_index, T value) |
| | Sets the value of an individual sample.
|
| void | clear () const |
| | Clears the buffer by setting all samples to zero.
|
| void | clear (T value) const |
| | Clears the buffer by setting all samples to the given value.
|
| void | clear (const size_t channel_index, const size_t start_sample, const size_t num_samples_to_clear) |
| | Clear a range of samples in a channel, without bounds checking.
|
| void | copy_from (const size_t dst_start_frame, const size_t num_frames_to_copy, const T *const *src, const size_t src_num_channels, const size_t src_start_frame=0) |
| | Copies data from all channels of src into all channels of this buffer.
|
| void | copy_from (const size_t dst_channel_index, const size_t dst_start_sample, const size_t num_samples_to_copy, const T *src) |
| | Copies data from src into this buffer, without bounds checking.
|
| void | copy_to (const size_t src_start_frame, const size_t num_frames, T *const *dst, const size_t dst_num_channels, const size_t dst_start_frame=0) |
| | Copies data from all channels of this buffer into dst.
|
| void | copy_to (const size_t src_channel_index, const size_t src_start_sample, const size_t num_samples_to_copy, T *dst) |
| | Copies data from this buffer into dst.
|
| bool | add (const AudioBufferView &other) |
| | Adds the samples of another audio buffer view to this audio buffer view.
|
| bool | is_valid () const |
| T | find_max_abs () const |
| T | find_max_abs (const size_t channel_index) const |
| | @channel_index The index of the channel to find the maximum value for.
|
| AudioBufferView | with_num_channels (const size_t num_channels) |
| | Returns a copy of this view with given number of channels.
|
| AudioBufferView | with_num_frames (const size_t num_frames) |
| | Returns a copy of this view with given number of frames.
|
| AudioBufferView< std::add_const_t< T > > | const_view () const |
template<class T>
class rav::AudioBuffer< T >
A dynamically sizeable buffer to store non-interleaved audio, along with an array of pointers to the beginning of each channel.
- Template Parameters
-
Definition at line 41 of file audio_buffer.hpp.