Inherited by Audio::RingBuffer< SampleType, typename >.
|
| AZ_CLASS_ALLOCATOR (RingBufferBase, AZ::SystemAllocator) |
|
| RingBufferBase ([[maybe_unused]] const size_t numSamples) |
|
virtual size_t | AddData (const void *source, size_t numFrames, size_t numChannels)=0 |
|
virtual size_t | AddMultiTrackDataInterleaved ([[maybe_unused]] const void **source, [[maybe_unused]] size_t numFrames, [[maybe_unused]] size_t numChannels) |
|
virtual size_t | ConsumeData (void **dest, size_t numFrames, size_t numChannels, bool deinterleaveMultichannel=false)=0 |
|
virtual void | ResetBuffer ()=0 |
|
◆ AddData()
virtual size_t Audio::RingBufferBase::AddData |
( |
const void * |
source, |
|
|
size_t |
numFrames, |
|
|
size_t |
numChannels |
|
) |
| |
|
pure virtual |
Adds new data to the ringbuffer.
- Parameters
-
source | Source buffer to copy from. |
numFrames | Number of sample frames available to copy. |
numChannels | Number of channels in the sample data, samples = numFrames * numChannels. |
- Returns
- Number of sample frames copied.
Implemented in Audio::RingBuffer< SampleType, typename >.
◆ AddMultiTrackDataInterleaved()
virtual size_t Audio::RingBufferBase::AddMultiTrackDataInterleaved |
( |
[[maybe_unused] ] const void ** |
source, |
|
|
[[maybe_unused] ] size_t |
numFrames, |
|
|
[[maybe_unused] ] size_t |
numChannels |
|
) |
| |
|
inlinevirtual |
Adds new multi-track/multi-channel data to the ringbuffer in interleaved format. Not a required interface.
- Parameters
-
source | Source buffer to copy from. |
numFrames | Number of sample frames available to copy. |
numChannels | Number of tracks/channels in the source data, numSamples = numFrames * numChannels. |
- Returns
- Number of sample frames copied.
◆ ConsumeData()
virtual size_t Audio::RingBufferBase::ConsumeData |
( |
void ** |
dest, |
|
|
size_t |
numFrames, |
|
|
size_t |
numChannels, |
|
|
bool |
deinterleaveMultichannel = false |
|
) |
| |
|
pure virtual |
Consumes stored data from the ringbuffer.
- Parameters
-
dest | Where the data will be written to, typically an array of SampleType pointers. |
numFrames | Number of sample frames requested to consume. |
numChannels | Number of channels laid out in the dest parameter. |
deinterleaveMultichannel | In the case of multichannel data, if true do a deinterleaved copy into the dest array channels otherwise straight copy into dest[0]. |
- Returns
- Number of sample frames consumed.
Implemented in Audio::RingBuffer< SampleType, typename >.
◆ ResetBuffer()
virtual void Audio::RingBufferBase::ResetBuffer |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file:
- Gems/AudioSystem/Code/Include/Engine/AudioRingBuffer.h