systemConfig
field of
GMParamBlock. Bit 14 is set to 1 if the sound routines are present. In
DoInitialize()
your module should check this bit before attempting to
play sound.
The sound routines support the playing of 'snd ' resources (also known
as sampledSynth type sounds). There are four routines used to play
sound. All of the routines take the parameter "sndChannel" (OpenSound()
also takes "params" as a parameter). The routines are: OpenSound()
,
PlaySound()
, QuietSound()
, and CloseSound()
.
Call OpenSound()
in your
module's DoInitialize()
routine to setup the playing of sound. To play
a sound, call PlaySound()
with a handle to a 'snd ' resource. If you
want to stop a sound being played, call QuietSound()
. Call
CloseSound()
in you module's DoClose()
routine to shutdown sound
playing.
For more information about sound, see the Sound Manager chapter in Inside Macintosh Volume 6.
main()
| Advanced
| Parameters
| Sound
| Resources
| Hints & Tips
| Further Info