# ssplSendBuffer

Send a buffer full of data.

### Synopsis

`int32 ssplSendBuffer ( SoundSpooler *sspl, SoundBufferNode *sbn )`

### Description

`ssplSendBuffer()` submits a SoundBufferNode ready for playback to the active queue. If the spooler has already been started, playback of this buffer will begin immediately if there are no other buffers in the active queue. In this case if a SoundBufferFunc in installed, a SSPL_SBMSG_STARVATION_START message is sent with sbn.

The SoundBufferNode is posted into the active buffer queue on success, or the free buffer list on failure. In either case, you are not permitted to modify the SoundBufferNode passed to this function after calling it.

When successful, sets SSPL_STATUS_F_ACTIVE.

### Arguments

sspl
  Pointer to a SoundSpooler structure.

sbn
  Pointer to a SoundBufferNode to send (returned from `ssplRequestBuffer()`).

### Return Value

Positive value on success indicating the signal to be sent when the buffer finishes playing, or negative 3DO error code on failure. Never returns zero.

### Implementation

Library call implemented in music.lib V21.

### Caveats

In the case where `ssplStartSpooler()` is called with an empty active queue and `ssplSendBuffer()` actually starts the spooler, `ssplSendBuffer()` calls SoundBufferFunc(SSPL_SBMSG_STARVATION_START) instead of SoundBufferFunc(SSPL_SBMSG_INITIAL_START). This isn't truly a starvation case, it's merely a difference in order of calls, but `ssplSendBuffer()` can't tell the difference.

### Associated Files

soundspooler.h, music.lib

### See Also

``ssplUnrequestBuffer`(), ssplUnrequestBuffer(), ssplSetBufferAddressLength(), ssplSpoolData(), ssplGetSpoolerStatus()`