Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.
SysBeep
You can use theSysBeep
procedure to play the system alert sound.
PROCEDURE SysBeep (duration: Integer);
duration
- The duration (in ticks) of the resulting sound. This parameter is ignored except on a Macintosh Plus, Macintosh SE, or Macintosh Classic when the system alert sound is the Simple Beep. The recommended duration is 30 ticks, which equals one-half second.
DESCRIPTION
TheSysBeep
procedure causes the Sound Manager to play the system alert sound at its current volume. If necessary, the Sound Manager loads into memory the sound resource containing the system alert sound and links it to a sound channel. The user selects a system alert sound in the Alert Sounds subpanel of the Sound control panel.The volume of the sound produced depends on the current setting of the system alert sound volume, which the user can adjust in the Alert Sounds subpanel of the Sound control panel. The system alert sound volume can also be read and set by calling the
GetSysBeepVolume
andSetSysBeepVolume
routines. If the volume is set to 0 (silent) and the system alert sound is enabled, callingSysBeep
causes the menu bar to blink once.SPECIAL CONSIDERATIONS
Because theSysBeep
procedure moves memory, you should not call it at interrupt time.SEE ALSO
For information on enabling and disabling the system alert sound, see the description ofSndGetSysBeepState
andSndGetSysBeepState
on page 2-137. For information on reading or adjusting the system alert sound volume, see "Controlling Volume Levels" beginning on page 2-139.