How Do I Determine When a Sample or Envelope


Samples and envelopes become associated with an instrument by creating an attachment item. You can use the same sample on multiple instruments, or you can use multiple samples on one instrument. What you really need to know is when a specific attachment has finished. There are two ways to do this:

Be careful when you are polling for an instrument to finish. Never loop continuously while polling. This is called busy waiting. Busy waiting takes up CPU cycles and can cause a drop in performance or a deadlock.

For More Information

See Preparing Instruments, for complete programming details.

See Audio Folio Calls, in the 3DO Music and Audio Programmer's Reference for information on these calls.

See the example files ta_attach.c and sample_envelope.c for examples of MonitorAttachment() usage.