Inherits Audio::RingBufferBase.
|
| AZ_CLASS_ALLOCATOR (RingBuffer< SampleType >, AZ::SystemAllocator) |
|
| RingBuffer (size_t numSamples) |
|
size_t | AddData (const void *source, size_t numFrames, size_t numChannels) override |
|
size_t | AddMultiTrackDataInterleaved (const void **source, size_t numFrames, size_t numChannels) override |
|
size_t | ConsumeData (void **dest, size_t numFrames, size_t numChannels, bool deinterleaveMultichannel) override |
|
| AZ_CLASS_ALLOCATOR (RingBufferBase, AZ::SystemAllocator) |
|
| RingBufferBase ([[maybe_unused]] const size_t numSamples) |
|
virtual size_t | AddMultiTrackDataInterleaved ([[maybe_unused]] const void **source, [[maybe_unused]] size_t numFrames, [[maybe_unused]] size_t numChannels) |
|
|
static const size_t | s_bytesPerSample = sizeof(SampleType) |
|
|
void | ResetBuffer () override |
|
void | AllocateData (size_t numSamples) |
|
void | DeallocateData () |
|
size_t | SamplesReady () const |
|
size_t | SamplesUnused () const |
|
◆ AddData()
template<typename SampleType , typename = AZStd::enable_if_t<AZStd::is_arithmetic<SampleType>::value>>
size_t Audio::RingBuffer< SampleType, typename >::AddData |
( |
const void * |
source, |
|
|
size_t |
numFrames, |
|
|
size_t |
numChannels |
|
) |
| |
|
inlineoverridevirtual |
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.
Implements Audio::RingBufferBase.
◆ ConsumeData()
template<typename SampleType , typename = AZStd::enable_if_t<AZStd::is_arithmetic<SampleType>::value>>
size_t Audio::RingBuffer< SampleType, typename >::ConsumeData |
( |
void ** |
dest, |
|
|
size_t |
numFrames, |
|
|
size_t |
numChannels, |
|
|
bool |
deinterleaveMultichannel |
|
) |
| |
|
inlineoverridevirtual |
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.
Implements Audio::RingBufferBase.
◆ ResetBuffer()
template<typename SampleType , typename = AZStd::enable_if_t<AZStd::is_arithmetic<SampleType>::value>>
|
inlineoverrideprotectedvirtual |
The documentation for this class was generated from the following file:
- Gems/AudioSystem/Code/Include/Engine/AudioRingBuffer.h