SoundFontInfoLib  2.21.6
Library for parsing and rendering SF2 files
SF2::Render::BufferFacet Class Reference

Provides a simple std::vector view of an AudioBufferList. More...

#include <BufferFacet.hpp>

Public Member Functions

 BufferFacet ()
 Default constructor that does not hold a buffer list. More...
 
void setBufferList (AudioBufferList *bufferList, AudioBufferList *inPlaceSource)
 Install an AudioBufferList to work with. More...
 
void setFrameCount (AUAudioFrameCount frameCount)
 Set the number of frames that will be held in this buffer. More...
 
void setOffset (AUAudioFrameCount offset)
 Set the unprocessed offset value. More...
 
void release ()
 Forget the buffer list and its buffer pointers. More...
 
void copyInto (BufferFacet &destination, AUAudioFrameCount offset, AUAudioFrameCount frameCount) const
 Copy frames from this instance into another one. More...
 
size_t channelCount () const
 
AUValue * channel (size_t index) const
 
const std::vector< AUValue * > & channels () const
 

Detailed Description

Provides a simple std::vector view of an AudioBufferList.

Constructor & Destructor Documentation

◆ BufferFacet()

SF2::Render::BufferFacet::BufferFacet ( )
inline

Default constructor that does not hold a buffer list.

Member Function Documentation

◆ channel()

AUValue* SF2::Render::BufferFacet::channel ( size_t  index) const
inline
Returns
writable pointer to a channel's buffer

Referenced by copyInto(), setBufferList(), setFrameCount(), and setOffset().

◆ channelCount()

size_t SF2::Render::BufferFacet::channelCount ( ) const
inline
Returns
number of channels represented by the facet

Referenced by SF2::Render::InputBuffer::channelCount().

◆ channels()

const std::vector<AUValue*>& SF2::Render::BufferFacet::channels ( ) const
inline
Returns
read-only reference to the collection of channel buffer pointers.

◆ copyInto()

void SF2::Render::BufferFacet::copyInto ( BufferFacet destination,
AUAudioFrameCount  offset,
AUAudioFrameCount  frameCount 
) const
inline

Copy frames from this instance into another one.

Parameters
destinationthe BufferFacet to receive the frames
offsetthe offset to apply to both instances before performing the copy operation
frameCountthe number of frames to process

References channel().

◆ release()

void SF2::Render::BufferFacet::release ( )
inline

Forget the buffer list and its buffer pointers.

Referenced by SF2::Render::InputBuffer::releaseBuffers().

◆ setBufferList()

void SF2::Render::BufferFacet::setBufferList ( AudioBufferList *  bufferList,
AudioBufferList *  inPlaceSource 
)
inline

Install an AudioBufferList to work with.

NOTE: this is a borrow operation; there is no management of the lifetime of the bufferList value.

Parameters
bufferListthe AudioBufferList to use
inPlaceSourcean AudioBufferList to use for in-place operations. If AudioUnit does not support in-place then this should be OK to be a nullptr.

References channel().

Referenced by SF2::Render::InputBuffer::allocateBuffers().

◆ setFrameCount()

void SF2::Render::BufferFacet::setFrameCount ( AUAudioFrameCount  frameCount)
inline

Set the number of frames that will be held in this buffer.

Parameters
frameCountthe number of frames

References channel().

◆ setOffset()

void SF2::Render::BufferFacet::setOffset ( AUAudioFrameCount  offset)
inline

Set the unprocessed offset value.

Parameters
offsetthe index of the next frame to process.

References channel().


The documentation for this class was generated from the following file: