The Sound class handles all the sound aspects of your game.
-
Creates a new sound instance.If theOwner is specified, it sets the sound's owner property to theOwner, otherwise, it sets it to NULL. It returns a pointer
to the new instance created.
-
Sets up the sound class.It sets the signal, prevSignal and state properties to zero, then adds it to the global Sounds set. Lastly, it calls DoSound()
sndINIT.
-
Disposes of the sound instance.If fKEEP_CLIENT is FALSE, or no parameter is given, the client property is set to NULL. It then removes the sound from
the global Sounds set. It then disposes the sound.
-
Plays the sound.If the sound is already playing, it stops it, then starts playing it again. It initializes the sound, and if specified, sets the client
property to theClient.
-
Calls it's play() method, and any other sendParams specified. If bit 1 of state is set, it then disposes it.
-
Stops playing the sound is the handle property is set. If fKEEP_CLIENT is specified, and FALSE, the client property is set to NULL.
-
If the signal property is set, it sets the prevSignal to signal, signal to 0, and if the client property is set, calls the client's cue() method.
-
Pauses the pSound instance.
-
Reevaluates the sound's state.
-
If the owner property is NULL, or anOwner is euqal to the owner, the instance is disposed of.
-
Fades the sound instance specified by pSound.