Music Class Reference
#include <music.h>
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 Resource * | load (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] |
| Music::Music |
( |
Mix_Chunk * |
music |
) |
[protected] |
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
The documentation for this class was generated from the following files: