The Sound class handles all the sound aspects
of your game.
Properties
- state
- number
- priority
- loop
- handle
- signal
- prevSignal
- client
- owner
Methods
-
heapPtr new([heapPtr
theOwner]) |
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.
|
-
void init() |
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.
|
-
void dispose([bool
fKEEP_CLIENT]) |
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.
|
-
void play([heapPtr
theClient]) |
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.
|
-
void playMaybe([sendParams]) |
Calls it's play() method, and
any other sendParams specified. If bit 1 of state is set, it
then disposes it.
|
-
void stop([bool
fKEEP_CLIENT]) |
Stops playing the sound is the
handle property is set. If fKEEP_CLIENT is specified, and FALSE,
the client property is set to NULL.
|
-
void check() |
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.
|
-
void pause(heapPtr
pSound) |
Pauses the pSound instance.
|
-
void changeState() |
Reevaluates the sound's state.
|
-
void clean(heapPtr
anOwner) |
If the owner property is NULL,
or anOwner is euqal to the owner, the instance is disposed of.
|
-
void fade(heapPtr
pSound) |
Fades the sound instance specified
by pSound.
|
|