These functions can be used to put your task to sleep while a sound plays. wait() takes a wake-up mask as its argument. the wake-up mask is usually the mp_SigBit of a msgport that you have set up to get replies back from the audio device. waitport() will put your task to sleep while a sound plays. the argument to WaitPort() is a pointer to a MsgPort that you have set up to get replies back from the audio device. wait() and waitport() will not remove the message from the reply port. You must use getmsg() to remove it. You must always use Wait() or WaitPort() to wait for I/O to finish with the audio device.