Public Member Functions | |
| Sample (const string &filename, const fp volume=DEFAULT_VOLUME) | |
| ~Sample () | |
| void | Play (const bool loop, const fp volume) |
| void | Stop (void) |
| bool | IfPlaying (void) |
| void | SetVolume (const fp volume) |
| fp | GetVolume (void) |
Private Attributes | |
| fp | mVolume |
| current volume (PLIB alters waveform data) | |
| bool | mLoop |
| whether to repeat sample | |
| slSample * | mSLSample |
| PLIB audio object. | |
| string | mBuf |
| stored for changing volume | |
| sound::SoundPlib::Sample::Sample | ( | const string & | filename, | |
| const fp | volume = DEFAULT_VOLUME | |||
| ) |
Load sample from file.
| filename | gzipped audio file (eg crash.wav.gz). |
| sound::SoundPlib::Sample::~Sample | ( | ) |
| void sound::SoundPlib::Sample::Play | ( | const bool | loop, | |
| const fp | volume | |||
| ) |
Play sample.
| void sound::SoundPlib::Sample::Stop | ( | void | ) |
Stop playing sample.
| bool sound::SoundPlib::Sample::IfPlaying | ( | void | ) |
If sample is playing.
| void sound::SoundPlib::Sample::SetVolume | ( | const fp | volume | ) |
Set volume of sample. NOTE: Stops the current sample, creates a new sample that won't be playing. SoundPlib::SetVolume() is supposed to play it afterwards.
| volume | 0.0 = off, 1.0 max volume. |
| fp sound::SoundPlib::Sample::GetVolume | ( | void | ) |
fp sound::SoundPlib::Sample::mVolume [private] |
current volume (PLIB alters waveform data)
bool sound::SoundPlib::Sample::mLoop [private] |
whether to repeat sample
slSample* sound::SoundPlib::Sample::mSLSample [private] |
PLIB audio object.
string sound::SoundPlib::Sample::mBuf [private] |
stored for changing volume
Palomino Flight Simulator documents generated by doxygen 1.5.6 on Mon Dec 29 17:27:01 2008