A class that provides all of the information needed for a SoundFilter to process sound data.
More...
|
| SoundFrame () |
| Create a new sound sound frame which has no buffers and the default capacity. More...
|
|
| SoundFrame (Size newNumBuffers) |
| Create a new sound sound frame which has the specified number of buffers (initially all NULL). More...
|
|
| SoundFrame (SoundBuffer *newBuffer) |
| Create a new sound sound frame which wraps a single SoundBuffer object pointer. More...
|
|
| SoundFrame (SoundBuffer *newBuffer1, SoundBuffer *newBuffer2) |
| Create a new sound sound frame which wraps two SoundBuffer object pointers. More...
|
|
| SoundFrame (const SoundFrame &other) |
| Create an exact copy of the specified sound frame, copying all of its buffer pointers. More...
|
|
| ~SoundFrame () |
| Destroy a sound sound frame and release all of its resources. More...
|
|
SoundFrame & | operator= (const SoundFrame &other) |
| Assign the contents of the specified sound frame, including its buffer pointers. More...
|
|
Size | getBufferCount () const |
| Get the number of buffers that this sound frame contains. More...
|
|
void | setBufferCount (Size newNumBuffers) |
| Change the size of the internal buffer array, padding any new buffer pointers with NULL. More...
|
|
SoundBuffer * | getBuffer (Index bufferIndex) |
| Return the SoundBuffer within this sound frame at the specified index. More...
|
|
const SoundBuffer * | getBuffer (Index bufferIndex) const |
| Return the SoundBuffer within this sound frame at the specified index. More...
|
|
void | setBuffer (Index bufferIndex, SoundBuffer *newBuffer) |
| Replace the SoundBuffer pointer at the specified index with a new pointer. More...
|
|
void | addBuffer (SoundBuffer *newBuffer) |
| Add the specified buffer pointer to the end of this frame's list of buffers. More...
|
|
void | insertBuffer (Index newBufferIndex, SoundBuffer *newBuffer) |
| Insert the specified buffer pointer at the specified index in this frame's list of buffers. More...
|
|
void | removeBuffer (Index bufferIndex) |
| Remove the buffer from this sound frame at the specified index. More...
|
|
void | clearBuffers () |
| Remove all buffers from this sound frame. More...
|
|
void | setBuffersToNull () |
| Keep the current number of valid buffers the same, but set all buffer pointers to NULL. More...
|
|
Size | getMIDIBufferCount () const |
| Get the number of MIDI buffers that this sound frame contains. More...
|
|
void | setMIDIBufferCount (Size newNumBuffers) |
| Change the size of the internal MIDI buffer array, padding any new buffer pointers with NULL. More...
|
|
MIDIBuffer * | getMIDIBuffer (Index bufferIndex) |
| Return a pointer to the MIDI buffer within this sound frame at the specified index. More...
|
|
const MIDIBuffer * | getMIDIBuffer (Index bufferIndex) const |
| Return the MIDI buffer within this sound frame at the specified index. More...
|
|
void | setMIDIBuffer (Index bufferIndex, MIDIBuffer *newBuffer) |
| Replace the MIDI buffer pointer at the specified index with a new pointer. More...
|
|
void | addMIDIBuffer (MIDIBuffer *newBuffer) |
| Add the specified MIDI buffer pointer to the end of this frame's list of MIDI buffers. More...
|
|
void | insertMIDIBuffer (Index newBufferIndex, MIDIBuffer *newBuffer) |
| Insert the specified MIDI buffer pointer at the specified index in this frame's list of MIDI buffers. More...
|
|
void | removeMIDIBuffer (Index bufferIndex) |
| Remove the MIDI buffer from this sound frame at the specified index. More...
|
|
void | clearMIDIBuffers () |
| Remove all MIDI buffers from this sound frame. More...
|
|
void | setMIDIBuffersToNull () |
| Keep the current number of valid MIDI buffers the same, but set all buffer pointers to NULL. More...
|
|
void | copyTo (SoundFrame &other) const |
| Copy this sound sound frame's entire data to another frame, replacing its data. More...
|
|
void | copyMIDITo (SoundFrame &other) const |
| Copy this sound sound frame's MIDI data to another frame, replacing its MIDI data. More...
|
|
const Time & | getTime () const |
| Return the absolute time of the start of this sound frame. More...
|
|
void | setTime (const Time &newTime) |
| Set the absolute time of the start of this sound frame. More...
|
|
A class that provides all of the information needed for a SoundFilter to process sound data.
Primarily, a sound frame holds an internal array of pointers to SoundBuffer objects which represent the buffers for each filter input or output. These buffers are allowed to be NULL, indicating that either the input at that index was not provided or the output at that index is not needed.
A sound frame uses a fixed-size internal array of pointers to SoundBuffer objects but can also allocate a variable-sized array of buffer pointers if the capacity of the fixed size array is exceeded. This is done for performance, so that an allocation is not performed in most cases when using multiple buffers.
A similar buffer scheme is used for MIDI data. All MIDI events that are part of a frame are specified with their timestamp relative to the main frame absolute timestamp, rather than as absolute timestamps.
Each sound frame has an associated absolute timestamp, measured relative to the Epoch, 1970-01-01 00:00:00 +0000 (UTC). This allows the filter to detect breaks in the sound timeline and react accordingly, or to synchronize sound processing, such as with video.