ssplAbort

Abort SoundSpooler buffers in active queue.

Synopsis

Err ssplAbort ( SoundSpooler *sspl, void(*UserBufferProcessor) ( SoundSpooler *,SoundBufferNode * ) )

Description

ssplAbort() stops the spooler (by calling ssplStopSpooler()) and removes all buffers in the active queue (by calling ssplReset()) , including the one currently being played.

If a SoundBufferFunc is installed, a SSPL_SBMSG_ABORT message is sent to it with each SoundBufferNode removed from the active queue. If UserBufferProcessor is non-NULL, each SoundBufferNode removed from the active queue is passed to it. If both a SoundBufferFunc and UserBufferProcessor are supplied, ssplAbort() fails and returns ML_ERR_BAD_ARG.

If SoundBufferFunc fails, ssplAbort() fails immediately and returns the error code returned by SoundBufferFunc without removing the rest of the buffers from the active queue. Calling ssplAbort() again safely picks up where it left off.

Clears SSPL_STATUS_F_STARED, SSPL_STATUS_F_PAUSED, and SSPL_STATUS_F_ACTIVE.

Arguments

sspl
SoundSpooler to abort.
UserBufferProcessor
Pointer to a function to call with each SoundBufferNode removed from the active queue, or NULL.

Return Value

Non-negative value on success, or negative 3DO error code on failure.

Implementation

Library call implemented in music.lib V21.

Associated Files

soundspooler.h, music.lib

See Also

ssplStopSpooler(), ssplSendBuffer(), ssplProcessSignals(), ssplReset(), SoundBufferFunc(), UserBufferProcessor() ssplGetSpoolerStatus()