Important: The information in this document is obsolete and should not be used for new development.
MyAlertSound
If you want the Dialog Manager to play sounds other than the system alert sound, write your own sound procedure and call theErrorSoundprocedure to make it the current sound procedure. For example, you can declare a sound procedure namedMyAlertSound, as shown here:
PROCEDURE MyAlertSound (soundNo: Integer);
soundNo- An integer from 0 to 3, representing the four possible alert stages.
DESCRIPTION
For each of the four alert stages that can be reported in thesoundNoparameter, your procedure can emit any sound that you define. When the Dialog Manager calls your procedure, it passes 0 as the sound number for alert sounds specified by thesilentconstant in the alert resource. The Dialog Manager passes 1 for sounds specified by thesound1constant, 2 for sounds specified by thesound2constant, and 3 for sounds specified by thesound3constant.SPECIAL CONSIDERATIONS
When the Dialog Manager detects a click outside an alert box or a modal dialog box, it uses the Sound Manager procedureSysBeepto play the system alert sound. By changing settings in the Sound control panel, the user can select which sound to play as the system alert sound. For consistency with system software and other Macintosh applications, your sound procedure should callSysBeepwhenever your sound procedure receives sound number 1 (which you can represent with thesound1constant).SEE ALSO
Listing 6-3 on page 6-22 illustrates how to useMyAlertSound. TheSysBeepprocedure is described in Inside Macintosh: Sound.