Miles Sound System SDK 7.2a

AIL_release_channel

The function AIL_release_channel returns a MIDI channel previously locked with AIL_lock_channel to the sequence which formerly "owned" it, if any.

void AIL_release_channel(
  HMDIDRIVER mdi,
  S32 channel
);

In Parameters

mdi
specifies the driver from which the locked channel was allocated.
channel
specifies a locked physical MIDI channel number from 1 to 16.

Discussion

As with all XMIDI functions which require an explicit channel parameter, MIDI channel numbers are passed to and from the MSS API in 1-based format (1-16), rather than the 0-based format (0-15) used when composing MIDI Status byte values.

Although messages from MIDI sequences are no longer sent to a MIDI channel after it is locked by the application, the driver still tracks MIDI and XMIDI controller values for that channel as they are altered by events associated with the sequence from which the channel was "stolen." When a channel is returned to the driver by AIL_release_channel (or an XMIDI Channel Lock controller with a value below 64), the function automatically updates the channel with its current MIDI and XMIDI controller values, pitch wheel, and Program Change (Patch) values, overriding any controller values set and silencing any notes turned on by the application while the channel was locked.


Group: XMIDI Services
Related Sections: XMIDI Channel Lock (110)
Related Functions: AIL_lock_channel, AIL_release_channel
Related Basic Types: HMDIDRIVER, S32, void

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.