Music Class Reference

#include <music.h>

Inheritance diagram for Music:

Resource

List of all members.


Detailed Description

Defines a class for loading and storing music.

Definition at line 36 of file music.h.


Public Member Functions

virtual ~Music ()
 Destructor.
virtual bool play (int loops)
 Plays the music.
virtual void stop ()
 Stops the music.

Static Public Member Functions

static Resourceload (void *buffer, unsigned bufferSize)
 Loads a music from a buffer in memory.

Protected Member Functions

 Music (Mix_Chunk *music)
 Constructor.

Protected Attributes

Mix_Chunk * mChunk
int mChannel

Constructor & Destructor Documentation

Music::~Music (  )  [virtual]

Destructor.

Definition at line 32 of file music.cpp.

Music::Music ( Mix_Chunk *  music  )  [protected]

Constructor.

Definition at line 26 of file music.cpp.


Member Function Documentation

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

Loads a music from a buffer in memory.

Parameters:
buffer The memory buffer containing the music data.
bufferSize The size of the memory buffer in bytes.
Returns:
NULL if the an error occurred, a valid pointer otherwise.

Definition at line 38 of file music.cpp.

bool Music::play ( int  loops  )  [virtual]

Plays the music.

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

Definition at line 58 of file music.cpp.

void Music::stop (  )  [virtual]

Stops the music.

Definition at line 73 of file music.cpp.


Member Data Documentation

Mix_Chunk* Music::mChunk [protected]

Definition at line 77 of file music.h.

int Music::mChannel [protected]

Definition at line 78 of file music.h.


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

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