OpenXcom
1.0
Open-source clone of the original X-Com
|
Container for music tracks. More...
#include <Music.h>
Public Member Functions | |
Music () | |
Creates a blank music track. More... | |
virtual | ~Music () |
Cleans up the music track. More... | |
virtual void | load (const std::string &filename) |
Loads music from the specified file. More... | |
virtual void | load (const void *data, int size) |
Loads music from a chunk of memory. More... | |
virtual void | play (int loop=-1) const |
Plays the music. More... | |
Static Public Member Functions | |
static void | stop () |
Stops all music. More... | |
static void | pause () |
Pauses all music. More... | |
static void | resume () |
Resumes all music. More... | |
Container for music tracks.
Handles loading and playing various formats through SDL_mixer.
OpenXcom::Music::Music | ( | ) |
Creates a blank music track.
Initializes a new music track.
|
virtual |
Cleans up the music track.
Deletes the loaded music content.
|
virtual |
Loads music from the specified file.
Loads a music file from a specified filename.
filename | Filename of the music file. |
Reimplemented in OpenXcom::AdlibMusic.
|
virtual |
Loads music from a chunk of memory.
Loads a music file from a specified memory chunk.
data | Pointer to the music file in memory |
size | Size of the music file in bytes. |
Reimplemented in OpenXcom::AdlibMusic.
|
static |
Pauses all music.
Pauses music playback when game loses focus.
|
virtual |
Plays the music.
Plays the contained music track.
loop | Amount of times to loop the track. -1 = infinite |
Reimplemented in OpenXcom::AdlibMusic.
|
static |
Resumes all music.
Resumes music playback when game gains focus.
|
static |
Stops all music.
Stops all music playing.