Public Member Functions | |
| Sample (const string &filename, const fp volume=DEFAULT_VOLUME) | |
| ~Sample () | |
| void | Play (const bool loop, const fp volume) |
| void | Stop (void) |
| void | SetVolume (const fp volume) |
| fp | GetVolume (void) |
Private Attributes | |
| fp | mVolume |
| current volume (PLIB alters waveform data) | |
| bool | mPlaying |
| bool | mLoop |
| slSample * | mSLSample |
| PLIB audio object. | |
| string | mBuf |
| stored for changing volume | |
| snd::SoundPlib::Sample::Sample | ( | const string & | filename, | |
| const fp | volume = DEFAULT_VOLUME | |||
| ) |
Load sample from file.
| filename | gzipped audio file (eg crash.wav.gz). |
| snd::SoundPlib::Sample::~Sample | ( | ) |
| void snd::SoundPlib::Sample::Play | ( | const bool | loop, | |
| const fp | volume | |||
| ) |
Play sample.
| void snd::SoundPlib::Sample::Stop | ( | void | ) |
Stop playing sample.
| void snd::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 snd::SoundPlib::Sample::GetVolume | ( | void | ) |
fp snd::SoundPlib::Sample::mVolume [private] |
current volume (PLIB alters waveform data)
bool snd::SoundPlib::Sample::mPlaying [private] |
bool snd::SoundPlib::Sample::mLoop [private] |
slSample* snd::SoundPlib::Sample::mSLSample [private] |
PLIB audio object.
string snd::SoundPlib::Sample::mBuf [private] |
stored for changing volume
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:32 2007