ssplProcessSignals()
, ssplAbort()
, and ssplReset()
.
void (*UserBufferProcessor) ( SoundSpooler *sspl, SoundBufferNode *sbn )
ssplProcessSignals()
for each buffer that has finished playing and ssplAbort()
for each buffer that is removed from the active buffer queue. This function can be used as notification that the sound spooler is done with a given buffer. For example, if sound is being spooled from a network connection, this function could be used to reply the network packet that contained the sample data for a given buffer.
Using the SoundBufferNode's UserData field can help identify the buffer being passed to this function (for example, UserData could be a pointer to the aforementioned network packet). See ssplGetUserData()
.
It is not legal to do anything to disturb the sound spooler's active buffer queue during this function. In particular, do not call ssplSendBuffer()
or anything that might call ssplSendBuffer()
as this will confuse the list processor in ssplProcessSignals()
.
The state of SSPL_STATUS_F_ACTIVE is undefined when inside a UserBufferProcessor function.
ssplProcessSignals()
or ssplAbort()
.
There are plenty of sound spooler functions in which buffers can be removed from the active queue without any means for the client to provide a UserBufferProcessor function. This list includes, but is not limited to ssplDeleteSoundSpooler()
, ssplAttachInstrument()
, ssplDetachInstrument()
, and ssplPlayData()
. Consider using a SoundBufferFunc instead of a UserBufferProcessor.
SoundBufferFunc
(), ssplProcessSignals(), ssplAbort(), ssplReset()