ManaPlus
|
#include <sdlmusic.h>
Public Member Functions | |
SDLMusic () | |
SDLMusic (Mix_Music *const music, SDL_RWops *const rw, const std::string &name) | |
~SDLMusic () | |
bool | play (const int loops, const int fadeIn) const |
int | calcMemoryLocal () const |
std::string | getCounterName () const |
Public Member Functions inherited from Resource | |
Resource () | |
~Resource () | |
virtual void | incRef () |
virtual void | decRef () |
Public Member Functions inherited from MemoryCounter | |
MemoryCounter () | |
virtual | ~MemoryCounter () |
int | calcMemory (const int level) const |
virtual int | calcMemoryChilds (const int level) const |
Protected Attributes | |
std::string | mName |
Mix_Music * | mMusic |
SDL_RWops * | mRw |
Additional Inherited Members | |
Data Fields inherited from Resource | |
time_t | mTimeStamp |
std::string | mIdPath |
std::string | mSource |
unsigned int | mRefCount |
bool | mProtected |
bool | mNotCount |
Defines a class for loading and storing music.
Definition at line 39 of file sdlmusic.h.
|
inline |
SDLMusic::SDLMusic | ( | Mix_Music *const | music, |
SDL_RWops *const | rw, | ||
const std::string & | name | ||
) |
SDLMusic::~SDLMusic | ( | ) |
|
virtual |
Reimplemented from Resource.
Definition at line 72 of file sdlmusic.cpp.
References Resource::calcMemoryLocal(), and SDLMusic().
|
inlinevirtual |
bool SDLMusic::play | ( | const int | loops, |
const int | fadeIn | ||
) | const |
Plays the music.
loops | Number of times to repeat the playback (-1 means forever). |
fadeIn | Duration in milliseconds to fade in the music. |
true
if the playback started properly false
otherwise. Definition at line 64 of file sdlmusic.cpp.
References mMusic.
Referenced by SoundManager::playMusic().
|
protected |
Definition at line 80 of file sdlmusic.h.
Referenced by play(), and ~SDLMusic().
|
protected |
Definition at line 79 of file sdlmusic.h.
Referenced by getCounterName().
|
protected |
Definition at line 81 of file sdlmusic.h.
Referenced by ~SDLMusic().