#include <Sound/Font.h>
Public Member Functions | |
| void | Load (const char *file, bool useResourcePath=true) |
| Loads the specified sound. | |
| bool | IsPlaying () |
| Determines if the sound is currently playing. | |
| void | Play () |
| Plays the currently loaded sound. | |
| void | Stop () |
| Stops playing the sound. | |
| void | SetVolume (byte newVol) |
| Sets the volume of the music. | |
| byte | GetVolume () const |
| Gets the volume of the music. | |
The Sound class.
A class loads and plays Sound effects. The following sound formats are supported:
| byte Sound::GetVolume | ( | ) | const |
Gets the volume of the music.
| bool Sound::IsPlaying | ( | ) |
Determines if the sound is currently playing.
| void Sound::Load | ( | const char * | file, | |
| bool | useResourcePath = true | |||
| ) |
Loads the specified sound.
| [in] | file | the filename of the sound to load. |
| [in] | useResourcePath | set to true to use the currently set resource path. Defaults to true. |
| void Sound::SetVolume | ( | byte | newVol | ) |
Sets the volume of the music.
| [in] | newVol | the new volume between 0 (silent) and 255 (unnecessarily load). |
1.6.3