Provides helper methods to handle raw audio data arrays. More...
#include <AudioData.hpp>
Public Member Functions | |
WASM | AudioData (const uint maxNumberOfChannels, const uint maxNumberOfFrames) |
Creates an AudioData instance that allocates and owns maxNumberOfChannels * maxNumberOfFrames * sizeof(T) bytes. | |
WASM | ~AudioData () noexcept |
AudioData destructor. | |
WASM T * | getBuffer () |
Returns a pointer to the internal allocated audio memory location. | |
WASM T ** | getBuffers () |
Returns a pointer to the stacked audio memory location. | |
Provides helper methods to handle raw audio data arrays.
Audio data class.
switchboard::AudioData< T >::AudioData | ( | const uint | maxNumberOfChannels, |
const uint | maxNumberOfFrames | ||
) |
Creates an AudioData instance that allocates and owns maxNumberOfChannels * maxNumberOfFrames * sizeof(T) bytes.
This constructor is not realtime-safe as it allocates memory.
maxNumberOfChannels | The maximum number of channels. |
maxNumberOfFrames | The maximum number of frames. |
T * switchboard::AudioData< T >::getBuffer |
Returns a pointer to the internal allocated audio memory location.
T ** switchboard::AudioData< T >::getBuffers |
Returns a pointer to the stacked audio memory location.
This returns a pointer to a list of per-channel memory locations that have the same memory location as getBuffer().
This makes it possible to iterate over the channels of the buffer.