#include <soundeffect.h>
Definition at line 36 of file soundeffect.h.
Public Member Functions | |
virtual | ~SoundEffect () |
Destructor. | |
virtual bool | play (int loops, int volume) |
Plays the sample. | |
Static Public Member Functions | |
static Resource * | load (void *buffer, unsigned bufferSize) |
Loads a sample from a buffer in memory. | |
Protected Member Functions | |
SoundEffect (Mix_Chunk *soundEffect) | |
Constructor. | |
Protected Attributes | |
Mix_Chunk * | mChunk |
SoundEffect::~SoundEffect | ( | ) | [virtual] |
SoundEffect::SoundEffect | ( | Mix_Chunk * | soundEffect | ) | [inline, protected] |
Resource * SoundEffect::load | ( | void * | buffer, | |
unsigned | bufferSize | |||
) | [static] |
Loads a sample from a buffer in memory.
buffer | The memory buffer containing the sample data. | |
bufferSize | The size of the memory buffer in bytes. |
NULL
if the an error occurred, a valid pointer otherwise. Definition at line 31 of file soundeffect.cpp.
bool SoundEffect::play | ( | int | loops, | |
int | volume | |||
) | [virtual] |
Plays the sample.
loops | Number of times to repeat the playback. | |
volume | Sample playback volume. |
true
if the playback started properly false
otherwise. Definition at line 50 of file soundeffect.cpp.
Mix_Chunk* SoundEffect::mChunk [protected] |
Definition at line 72 of file soundeffect.h.