OpenXcom
1.0
Open-source clone of the original X-Com
|
Container for Adlib music tracks. More...
#include <AdlibMusic.h>
Public Member Functions | |
AdlibMusic (float volume=1.0f) | |
Creates a blank music track. More... | |
~AdlibMusic () | |
Cleans up the music track. More... | |
void | load (const std::string &filename) |
Loads music from the specified file. More... | |
void | load (const void *data, int size) |
Loads music from a chunk of memory. More... | |
void | play (int loop=-1) const |
Plays the music. More... | |
Public Member Functions inherited from OpenXcom::Music | |
Music () | |
Creates a blank music track. More... | |
virtual | ~Music () |
Cleans up the music track. More... | |
Static Public Member Functions | |
static void | player (void *udata, Uint8 *stream, int len) |
Adlib music player. More... | |
Static Public Member Functions inherited from OpenXcom::Music | |
static void | stop () |
Stops all music. More... | |
static void | pause () |
Pauses all music. More... | |
static void | resume () |
Resumes all music. More... | |
Container for Adlib music tracks.
Uses a custom YM3812 music player passed to SDL_mixer.
OpenXcom::AdlibMusic::AdlibMusic | ( | float | volume = 1.0f | ) |
Creates a blank music track.
Initializes a new music track.
volume | Music volume modifier (1.0 = 100%). |
OpenXcom::AdlibMusic::~AdlibMusic | ( | ) |
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 from OpenXcom::Music.
|
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 from OpenXcom::Music.
|
virtual |
Plays the music.
Plays the contained music track.
loop | Amount of times to loop the track. -1 = infinite |
Reimplemented from OpenXcom::Music.
|
static |
Adlib music player.
Custom audio player.
udata | User data to send to the player. |
stream | Raw audio to output. |
len | Length of audio to output. |