int32 ssplProcessSignals ( SoundSpooler *sspl,int32 SignalMask, void (*UserBufferProcessor) ( SoundSpooler *,SoundBufferNode * ) )
ssplProcessSignals()
informs the spooler about which buffers have finished, so the spooler can move them to the free buffer queue.
If a SoundBufferFunc in installed, a SSPL_SBMSG_COMPLETE message is sent to it with each completed SoundBufferNode removed from the active queue. Also, a SSPL_SBMSG_LINK_START message is sent with the next buffer in the active queue. If UserBufferProcessor is non-NULL, each completed SoundBufferNode removed from the active queue is passed to it. If both a SoundBufferFunc and UserBufferProcessor are supplied, ssplProcessSignals()
fails and returns ML_ERR_BAD_ARG.
In SoundBufferFunc fails, ssplProcessSignals()
fails immediately and returns the error code returned by SoundBufferFunc without processing the rest of the signals. Calling ssplProcessSignals()
again with the same signal set picks up where it left off.
Clears SSPL_STATUS_F_ACTIVE when all of the active buffers have completed (i.e. the flag is cleared when this function has processed the completion signals for all of the buffers that were in the active queue at the time that this function was called). You can use this to detect when the last submitted buffer has finished.
WaitSignal()
.
ssplProcessSignals()
synchronizes the sound spooler's queues to the set of signals collected at the last WaitSignal()
. Many of the other sound spooler functions assume that the sound spooler has been synchronized in this way (in particular ssplSendBuffer()
). Do not call any sound spooler functions between a WaitSignal()
involving sound spooler signals and ssplProcessSignals()
.
ssplProcessSignals()
is called again.
ssplSendBuffer
(), ssplAbort(), SoundBufferFunc(), UserBufferProcessor(), ssplGetSpoolerStatus()