snd::SoundPlib::Sample Class Reference

Defines a sound sample. More...

List of all members.

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


Detailed Description

Defines a sound sample.

Constructor & Destructor Documentation

snd::SoundPlib::Sample::Sample ( const string &  filename,
const fp  volume = DEFAULT_VOLUME 
)

Load sample from file.

Parameters:
filename gzipped audio file (eg crash.wav.gz).

snd::SoundPlib::Sample::~Sample (  ) 


Member Function Documentation

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.

Parameters:
volume 0.0 = off, 1.0 max volume.

fp snd::SoundPlib::Sample::GetVolume ( void   ) 


Member Data Documentation

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


The documentation for this class was generated from the following files: Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:32 2007