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 (const size_t numSamples) |
|
virtual size_t | AddData (const void *source, size_t numFrames, size_t numChannels)=0 |
|
virtual size_t | AddMultiTrackDataInterleaved (const void **source, size_t numFrames, size_t numChannels) |
|
virtual size_t | ConsumeData (void **dest, size_t numFrames, size_t numChannels, bool deinterleaveMultichannel=false)=0 |
|
virtual void | ResetBuffer ()=0 |
|
|
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.
◆ AddMultiTrackDataInterleaved()
template<typename SampleType , typename = AZStd::enable_if_t<AZStd::is_arithmetic<SampleType>::value>>
size_t Audio::RingBuffer< SampleType, typename >::AddMultiTrackDataInterleaved |
( |
const void ** |
source, |
|
|
size_t |
numFrames, |
|
|
size_t |
numChannels |
|
) |
| |
|
inlineoverridevirtual |
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.
Reimplemented from 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