# ssplReset

Reset Sound Spooler.

### Synopsis

`Err ssplReset ( SoundSpooler *sspl, void (*UserBufferProcessor) ( SoundSpooler *, SoundBufferNode * ) )`

### Description

This function removes all SoundBufferNodes from the active queue and clears their associated signal bits. `ssplAbort()` calls this function to clear the active queue after stopping the sound spooler.

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, `ssplReset()` fails and returns ML_ERR_BAD_ARG.

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

Clears SSPL_STATUS_F_ACTIVE.

### Arguments

sspl
  SoundSpooler to reset.

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.

### Note

This function does not disturb the sample player instrument. If the spooler has not been stopped, any data that has already been queued up will continue to play, even though the associated SoundBufferNodes have been removed from the active queue. It is generally a good idea to call this function only after stopping the sound spooler, or use `ssplAbort()` instead.

### Associated Files

soundspooler.h, music.lib

### See Also

``ssplAbort`(), SoundBufferFunc(), UserBufferProcessor(), ssplGetSpoolerStatus()`