Home  /  Autodocs  /  audio.device

NAME

ADCMD_FREE
free audio channels for allocation

FUNCTION

ADCMD_FREE is a command for multiple audio channels. For each selected channel (io_Unit), if the allocation key (ioa_AllocKey) is correct, ADCMD_FREE does the following:

Otherwise, ADCMD_FREE returns an error (ADIOERR_NOALLOCATION). ADCMD_FREE is synchronous and only replies (mn_ReplyPort) if the quick flag (IOF_QUICK) is clear. Do not use ADCMD_FREE in interrupt code.

INPUTS

io_Device
Pointer to device node, must be set by (or copied from I/O block set by) OpenDevice function

io_Unit
Bit map of channels to free (bits 0 thru 3 correspond to channels 0 thru 3)

io_Command
Command number for ADCMD_FREE

io_Flags
Flags, must be cleared if not used: IOF_QUICK - (CLEAR) reply I/O request

ioa_AllocKey
Allocation key, must be set by (or copied from I/O block set by) OpenDevice function or ADCMD_ALLOCATE command

RESULT

io_Unit
bit map of channels successfully freed (bits 0 thru 3 correspond to channels 0 thru 3)

io_Error
error number: 0 - no error ADIOERR_NOALLOCATION - allocation key (ioa_AllocKey)

does not match key for channel