ssplGetSpoolerStatus

Get SoundSpooler status flags.

Synopsis

int32 ssplGetSpoolerStatus (const SoundSpooler *sspl)

Description

Returns a set of flags SSPL_STATUS_F_ flags describing the current state of the SoundSpooler.

Arguments

sspl
Pointer to a SoundSpooler structure.

Return Value

Any combination of these flags (always a positive value):

SSPL_STATUS_F_ACTIVE
This flag are SoundBufferNodes in the SoundSpooler's active queue. It is set by ssplSendBuffer(). It can be cleared by ssplProcessSignals() when all of the buffers in the active queue have completed. It is always cleared by ssplReset() and ssplAbort(). You can use this flag as an indicator that all of the sound data submitted by ssplSendBuffer() has been played as of the most recent call to ssplProcessSignals().
SSPL_STATUS_F_STARTED
This flag indicates that the SoundSpooler has been started. Unless it has been paused, it is playing sound or will as soon as there is some to play. This flag is set by ssplStartSpooler() and cleared by ssplStopSpooler() and ssplAbort().
SSPL_STATUS_F_PAUSED
This flag indicates that the SoundSpooler has been paused. It is only meaningful if SSPL_STATUS_F_STARTED is also set. This flag is set by ssplPause() and cleared by ssplResume(), ssplStartSpooler(), and ssplStopSpooler().

Caveats

This state of SSPL_STATUS_F_ACTIVE is undefined when inside any SoundSpooler callback function. This is the case because the callback functions can be called inside the loop that processes the active queue. No guarantee is made about whether a SoundBufferNode is removed from the active queue before or after the callback functions are called.

Implementation

Library call implemented in music.lib V24.

Associated Files

soundspooler.h, music.lib

See Also

ssplIsSpoolerActive(), ssplSendBuffer(), ssplProcessSignals()