UnloadInstrument

Unloads an instrument loaded with LoadInstrument().

Synopsis

Err UnloadInstrument (Item Instrument)

Description

This function frees the Instrument and unloads the Template loaded by LoadInstrument().

Do not confuse this function with DeleteInstrument(), which deletes an Instrument created by CreateInstrument(). Calling DeleteInstrument() for an instrument created by LoadInstrument() deletes the Instrument, but not the Template, leaving you with an unaccessible Template Item that you can't delete. Calling UnloadInstrument() for and Instrument created by CreateInstrument() deletes Template for that Instrument along with all other Instruments created from that Template.

Arguments

Instrument
Item number of the instrument.

Return Value

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

Implementation

Folio call implemented in Audio folio V20.

Associated Files

audio.h

See Also

LoadInstrument(), DeleteInstrument(), UnloadInsTemplate()