sound.h| Type | |
| This type encapsulates a sound file. | |
| Functions | |
Creates a Sound object from the specified file. | |
| Frees the memory associated with the sound. | |
| Starts playing the sound. | |
typedef struct SoundCDT *Sound;
sounds.
The following code, for example, plays the sound file
ringtone.wav:
Sound ringtone = newSound("ringtone.wav");
play(ringtone);
Sound newSound(string filename);
Sound object from the specified file.
Usage:
sound = newSound(filename);
void freeSound(Sound sound);
Usage:
freeSound(sound);
void play(Sound sound);
Usage:
play(sound);