ssplSetBufferAddressLength

Attach sample data to a SoundBufferNode.

Synopsis

Err ssplSetBufferAddressLength ( SoundSpooler *sspl, SoundBufferNode *sbn, char *Data,int32 NumBytes )

Description

ssplSetBufferAddressLength() attaches sample data to a SoundBufferNode returned by ssplRequestBuffer(). This function is used internally by ssplPlayData() and ssplSpoolData().

Arguments

sspl
Pointer to SoundSpooler that owns sbn.
sbn
Pointer to a SoundBufferNode returned by ssplRequestBuffer().
Data
Pointer to sample data to attach to this SoundBufferNode.
NumBytes
Length of sample data (in bytes).

Return Value

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

Implementation

Library call implemented in music.lib V21.

Notes

The safe minimum size for spooler buffers appears to be around 256 bytes. Values less than this risk having gaps in the playback due insufficient time to process transitions from one sample Attachment to another. This minimum is in reality more a function of the time required to play a sample Attachment than that of sample length in bytes. The value 256 was determined using fixedstereosample.dsp which at the time of this writing had the fastest DMA consumption of all the DSP instruments (176,400 bytes/sec). This means that this value should be a suitable minimum spooler buffer length for any sample playback instrument used with the sound spooler.

Associated Files

soundspooler.h, music.lib

See Also

ssplRequestBuffer(), ssplSendBuffer(), ssplSpoolData()