|
MXL : Media eXchange Layer
MXL
|
A bounce buffer for audio samples. More...
#include <AudioBounceBuffer.hpp>

Public Member Functions | |
| AudioBounceBuffer (std::size_t entryCount, std::size_t entrySize, DataLayout::Continuous layout) | |
| std::size_t | entryCount () const noexcept |
| Return the number of entries in the bounce buffer. | |
| std::size_t | entrySize () const noexcept |
| Return the size of a bounce buffer entry in bytes. | |
| std::vector< Region > | getRegions () const noexcept |
| Return the regions corresponding to the bounce buffer entries. Each region corresponds to one bounce buffer entry. The regions are returned in the same order as the bounce buffer entries. | |
| AudioEntryHeader const & | unpack (std::size_t entryIndex, Region const &outRegion) const |
| Copy the samples from the bounce buffer entry to the provided output region, and return the header of the entry. | |
Static Public Member Functions | |
| static void | getMutableMultiBufferSlices (std::uint64_t index, std::size_t count, std::size_t bufferLength, std::size_t sampleWordSize, std::size_t channelCount, std::uint8_t *baseBufferPtr, mxlMutableWrappedMultiBufferSlice &slice) noexcept |
Private Attributes | |
| std::vector< AudioBounceBufferEntry > | _entries |
| DataLayout::Continuous | _layout |
A bounce buffer for audio samples.
For audio samples, a bounce buffer is used to receive the samples from the network before copying them to the final destination region. This is necessary because the samples to transfer on the Initiator are scattered at multiple locations (one per channel), but only a single memory address can be provided for the destination.
Definition at line 63 of file AudioBounceBuffer.hpp.
| mxl::lib::fabrics::ofi::AudioBounceBuffer::AudioBounceBuffer | ( | std::size_t | entryCount, |
| std::size_t | entrySize, | ||
| DataLayout::Continuous | layout ) |
Definition at line 59 of file AudioBounceBuffer.cpp.
|
nodiscardnoexcept |
Return the number of entries in the bounce buffer.
Definition at line 75 of file AudioBounceBuffer.cpp.
|
nodiscardnoexcept |
Return the size of a bounce buffer entry in bytes.
Definition at line 80 of file AudioBounceBuffer.cpp.
|
staticnoexcept |
Definition at line 15 of file AudioBounceBuffer.cpp.
|
nodiscardnoexcept |
Return the regions corresponding to the bounce buffer entries. Each region corresponds to one bounce buffer entry. The regions are returned in the same order as the bounce buffer entries.
Definition at line 64 of file AudioBounceBuffer.cpp.
| AudioEntryHeader const & mxl::lib::fabrics::ofi::AudioBounceBuffer::unpack | ( | std::size_t | entryIndex, |
| Region const & | outRegion ) const |
Copy the samples from the bounce buffer entry to the provided output region, and return the header of the entry.
Internally the header will be used to correctly map the bounce buffer entry slices to the output region slices.
Definition at line 85 of file AudioBounceBuffer.cpp.
|
private |
Definition at line 92 of file AudioBounceBuffer.hpp.
|
private |
Definition at line 93 of file AudioBounceBuffer.hpp.