UGDK
0.5.0
|
#include <ugdk/audio/sample.h>
Public Member Functions | |
void | Play () |
Plays the sound. More... | |
void | PlayForever () |
Plays this sample until told to stop. More... | |
void | Play (int loops) |
Plays the sound the given number of times. More... | |
void | Stop () |
Stops playing the sound. More... | |
bool | IsPlaying () |
Returns whether the sound is playing or not. More... | |
void | SetVolume (double vol) |
Sets the volume. More... | |
double | Volume () |
Returns the sound's volume. More... | |
Friends | |
class | Manager |
Note: It isn't possible to instantiate a Sample directly. In order to play a sound, you must call LoadSample() from AudioManager. All memory management is done my the AudioManager.
bool ugdk::audio::Sample::IsPlaying | ( | ) |
Returns whether the sound is playing or not.
void ugdk::audio::Sample::Play | ( | ) |
Plays the sound.
void ugdk::audio::Sample::Play | ( | int | loops | ) |
Plays the sound the given number of times.
void ugdk::audio::Sample::PlayForever | ( | ) |
Plays this sample until told to stop.
void ugdk::audio::Sample::SetVolume | ( | double | vol | ) |
Sets the volume.
Sets the volume between 0 and 1. 0 is silent, 1 is the max volume.
vol | The volume. |
void ugdk::audio::Sample::Stop | ( | ) |
Stops playing the sound.
double ugdk::audio::Sample::Volume | ( | ) |
Returns the sound's volume.
|
friend |