MonitorAttachment

Monitors an attachment, sends a cue at a specified point.

Synopsis

Err MonitorAttachment (Item Attachment, Item Cue, int32 Index)

Description

This function sends a Cue to the calling task when the specified Attachment reaches the specified point. The function is often used with a sample Attachment to send a cue when the sample has been fully played.

There can be only one Cue per Attachment. The most recent call to MonitorAttachment() takes precedence.

To remove the current Cue from an Attachment, call MonitorAttachment (Attachment, 0, 0).

Arguments

Attachment
The item number for the Attachment.
Cue
Item number for the Cue to be associated with this attachment. Can be 0 to remove a the current Cue from the Attachment.
Index
Value indicating the point to be monitored. At this time, the only value that can be passed is CUE_AT_END, which asks that a Cue be sent at the end of an Attachment. Index is ignored if Cue is 0.

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

See Also

GetCueSignal(), StartAttachment(), LinkAttachments(), WhereAttachment()