a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Devices:
 audio.device
  ADCMD_ALLOCATE
  ADCMD_FINISH
  ADCMD_FREE
  ADCMD_LOCK
  ADCMD_PERVOL
  ADCMD_SETPREC
  ADCMD_WAITCYCLE
  AbortIO
  BeginIO
  CMD_CLEAR
  CMD_FLUSH
  CMD_READ
  CMD_RESET
  CMD_START
  CMD_STOP
  CMD_UPDATE
  CMD_WRITE
  CloseDevice
  Expunge
  OpenDevice
Include
GuruMeditation
Docs » Autodocs » audio.device » ADCMD_WAITCYCLE

NAME

       ADCMD_WAITCYCLE -- wait for an audio channel to complete the current
cycle of a write

FUNCTION

       ADCMD_WAITCYCLE is a command for a single audio channel (io_Unit).
If the allocation key (ioa_AllocKey) is correct and there is a write
(CMD_WRITE) in progress on selected channel, ADCMD_WAITCYCLE does not
reply (mn_ReplyPort) until the end of the current cycle. If there is
no write is progress, ADCMD_WAITCYCLE replies immediately. If the
allocation key is incorrect, ADCMD_WAITCYCLE returns an error
(ADIOERR_NOALLOCATION). ADCMD_WAITCYCLE returns an error
(IOERR_ABORTED) if it is canceled (AbortIO) or the channel is stolen
(ADCMD_ALLOCATE). ADCMD_WAITCYCLE is only asynchronous if it is
waiting for a cycle to complete, in which case it clears the quick
flag (IOF_QUICK); otherwise, it is synchronous and only replies if the
quick flag (IOF_QUICK) is clear. Do not use ADCMD_WAITCYCLE in
interrupt code at interrupt level 5 or higher.

INPUTS

       mn_ReplyPort- pointer to message port that receives I/O request, if
the quick flag (IOF_QUICK) is clear, or if a write is in
progress on the selected channel and a cycle has
completed
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 channel to wait for cycle (bits 0 thru 3
correspond to channels 0 thru 3), if more then one bit
is set lowest bit number channel is used
io_Command - command number for CMD_WAITCYCLE
io_Flags - flags, must be cleared if not used:
IOF_QUICK - (CLEAR) reply I/O request
(SET) only reply I/O request if a write is
in progress on the selected channel
and a cycle has completed
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 channel that successfully waited for cycle
(bits 0 thru 3 correspond to channels 0 thru 3)
io_Flags - IOF_QUICK flag cleared if a write is in progress on the
selected channel
io_Error - error number:
0 - no error
IOERR_ABORTED - canceled (AbortIO) or channel
stolen
ADIOERR_NOALLOCATION - allocation key (ioa_AllocKey)
does not match key for channel

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Defjam

SPB
CSL
PHA
DJ

Comments:

$VER: d0.se 1.14 Copyright © 2011-2020 Tobias Geijersson support at d0 dot se