ssplAttachInstrument

Attach new sample player instrument to SoundSpooler.

Synopsis

Err ssplAttachInstrument ( SoundSpooler *sspl, Item SamplerIns )

Description

ssplAttachInstrument() installs a new sample player instrument in the SoundSpooler. Any previously attached sample player instrument is detached (by calling ssplDetachInstrument()) before the new one is attached.

Arguments

sspl
pointer to a SoundSpooler structure.
SamplerIns
Instrument to attach buffer samples to.

Return Value

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

Implementation

Library call implemented in music.lib V21.

Class

Low level

Note

Any buffers in the active queue are aborted by calling ssplAbort(). Note that there is no provision to supply a UserBufferProcessor function to ssplAttachInstrument(). An installed SoundBufferFunc works correctly, however.

Caveats

Leaves the SoundSpooler in an indeterminate state if this function fails. A subsequent successful call to this function or to ssplDetachInstrument() restores the SoundSpooler to sanity.

Associated Files

soundspooler.h, music.lib

See Also

ssplDetachInstrument(), ssplAbort()