ADC Home > Reference Library > Technical Q&As > Audio > Carbon >

Not Recommended Documentclose button

Important: The information in this document is Not Recommended and should not be used for new development.

Current information on this Reference Library topic can be found here:

Synchronous SysBeep

Q: With Sound Manager 3.1 the system beep, SysBeep, became asynchronous. For my particular application I need to wait until the SysBeep is done playing the sound before I want to continue. How do I get the functionality of the old synchronous SysBeep?

A: The answer to getting a synchronous SysBeep is very simple, and doesn’t involve you trying to figure out how long to wait. Just ask the Sound Manager to play SysBeep synchronously and it will.

OSErr MakeSysBeepSynchronous (SInt16 *oldState) {
    OSErr        err;

    SndGetSysBeepState (oldState);
    err = SndSetSysBeepState (sysBeepEnable | sysBeepSynchronous);

    return err;

[Oct 05 1999]

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.