SoundEffect Class Reference

#include <soundeffect.h>

Inheritance diagram for SoundEffect:

Resource

List of all members.


Detailed Description

Defines a class for loading and storing sound effects.

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 Resourceload (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

Constructor & Destructor Documentation

SoundEffect::~SoundEffect (  )  [virtual]

Destructor.

Definition at line 26 of file soundeffect.cpp.

SoundEffect::SoundEffect ( Mix_Chunk *  soundEffect  )  [inline, protected]

Constructor.

Definition at line 70 of file soundeffect.h.


Member Function Documentation

Resource * SoundEffect::load ( void *  buffer,
unsigned  bufferSize 
) [static]

Loads a sample from a buffer in memory.

Parameters:
buffer The memory buffer containing the sample data.
bufferSize The size of the memory buffer in bytes.
Returns:
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.

Parameters:
loops Number of times to repeat the playback.
volume Sample playback volume.
Returns:
true if the playback started properly false otherwise.

Definition at line 50 of file soundeffect.cpp.


Member Data Documentation

Mix_Chunk* SoundEffect::mChunk [protected]

Definition at line 72 of file soundeffect.h.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:44 2009 for The Mana World by  doxygen 1.5.5