PauseInstrument

Pauses an instrument's playback.

Synopsis

Err PauseInstrument (Item Instrument)

Description

This function pauses an instrument during playback. A paused instrument ceases to play, but retains its position in playback so that it can resume playback at that point. ResumeInstrument() allows a paused instrument to continue its playback.

This function is intended primarily for sampled sound instruments, where a paused instrument retains its playback position within a sampled sound. PauseInstrument() and ResumeInstrument() used with sound synthesis instruments may not have effects any different from StartInstrument() and StopInstrument().

The paused state is superceded by a call to StartInstrument() or StopInstrument().

Arguments

Instrument
The item number for the instrument.

Return Value

The function returns a non-negative value if successful or an error code (a negative value) if an error occurs.

Implementation

SWI implemented in Audio folio V20.

Associated Files

audio.h

Caveats

This function will not pause an envelope attached to an instrument. The envelope will continue to play while the instrument is paused.

See Also

ResumeInstrument(), StartInstrument(), StopInstrument(), ReleaseInstrument()