Err StartAttachment( Item Attachment, TagArg *tp )
StartAttachment
() executes, it starts playback of the item listed in the specified attachment: a sample or an envelope. If successful, the call returns 0; if unsuccessful, it returns a negative value (an error code).
Starting an attachment is not like starting an instrument. StartAttachment()
just triggers the playback of an attached item to start; it does not load a DSP program and start it running the way StartInstrument()
does. The item started, however, plays back just as it would if it were started with the instrument. Its sustain and release loops work just as they do with StartInstrument()
with one exception: they must be released with ReleaseAttachment()
instead of with ReleaseInstrument()
.
Err ReleaseAttachment( Item Attachment, TagArg *tp )
ReleaseAttachment()
executes, it releases playback of the item listed in the specified attachment so playback can continue to the release loop or (if there is no release loop) to the end of the item. If successful, the call returns 0; if unsuccessful, it returns a negative value (an error code).
Err StopAttachment( Item Attachment, TagArg *tp )
StopAttachment()
executes, it completely stops playback of the item listed in the specified attachment. If successful, the call returns 0; if unsuccessful, it returns a negative value (an error code).If the attachment stopped is a stop linked attachment, the instrument to which it is attached stops as well. Stopping a non-stop-linked attachment does not stop the instrument.
Stopping an instrument directly stops all of the instruments attachments with it.