|
| | AudioBuffer ()=default |
| |
| | ~AudioBuffer () |
| |
| | AudioBuffer (const AudioBuffer &)=delete |
| |
| AudioBuffer & | operator= (const AudioBuffer &)=delete |
| |
| | AudioBuffer (AudioBuffer &&other) noexcept |
| | C++20 idiomatic move constructor.
|
| |
| AudioBuffer & | operator= (AudioBuffer &&other) noexcept |
| | C++20 idiomatic move assignment.
|
| |
| void | resize (int numChannels, int numSamples) |
| | Allocates the buffer for the given dimensions.
|
| |
| AudioBufferView< T, MaxChannels > | toView () noexcept |
| | Returns a non-owning mutable view of this buffer. The view's channel capacity is propagated from MaxChannels, so a buffer wider than the 16-channel view default is never silently truncated (for the default MaxChannels==16 this is exactly AudioBufferView<T>).
|
| |
| AudioBufferView< const T, MaxChannels > | toView () const noexcept |
| | Returns a non-owning const view of this buffer.
|
| |
| T * | getChannel (int ch) noexcept |
| | Returns a pointer to the sample data.
|
| |
| const T * | getChannel (int ch) const noexcept |
| | Const overload.
|
| |
| int | getNumChannels () const noexcept |
| | Returns the number of active channels.
|
| |
| int | getNumSamples () const noexcept |
| | Returns the number of samples per channel.
|
| |
| void | clear () noexcept |
| | Clears all channels, including SIMD alignment padding. Ensures any SIMD over-read will consume pure zeros (no denormals).
|
| |
template<typename T, int MaxChannels = 16>
class dspark::AudioBuffer< T, MaxChannels >
Owning audio buffer with contiguous, 32-byte aligned storage.
- Template Parameters
-
| T | Sample type (float or double). |
| MaxChannels | Maximum supported channels. |
Definition at line 276 of file AudioBuffer.h.
template<typename T , int MaxChannels = 16>
Allocates the buffer for the given dimensions.
Existing contents are NOT preserved: the buffer (including its SIMD padding) is zeroed after every call. Memory is only re-allocated when the request exceeds the current capacity; shrinking reuses it. May throw std::bad_alloc; the buffer stays coherent and reusable after.
- Parameters
-
| numChannels | Number of active channels (must be <= MaxChannels). |
| numSamples | Number of audio samples per channel. |
Definition at line 330 of file AudioBuffer.h.