#include <ZE_ZMusic.h>
Public Methods | |
| ZMusic () | |
| Default Constructor. | |
| ZMusic (string filename) | |
| Constructor that opens a music file. | |
| virtual | ~ZMusic () |
| Destructor, frees memory. | |
| void | Open (string filename) |
| Opens a music file. | |
| void | Release () |
| Release music. | |
| void | Play (int loopNum=0, int fadeTime=0) const |
| Play currently loaded music. | |
| void | Pause () const |
| Pause music. | |
| void | Unpause () const |
| Unpause music. | |
| void | Rewind () const |
| Rewind music. | |
| void | Stop (int fadeTime=0) const |
| Stop music. | |
| void | SetVolume (int volume) |
| Change Volume. | |
| bool | IsLoaded () const |
| Check if file is loaded. | |
| bool | IsPlaying () const |
| Check if music is Playing. | |
| bool | IsPaused () const |
| Check if music is Paused. | |
| int | Volume () const |
| Find Current Volume of Music. | |
Static Public Attributes | |
| const int | LoopInfinite |
| Static Variable For Infinite loop of sound. (Defined as -1). | |
Protected Attributes | |
| ZEngine * | rEngine |
| Pointer to ZEngine Object. | |
| Mix_Music * | rMusic |
| Pointer to music data. | |
|
|
Default Constructor, does nothing. |
|
|
Constructor simply calls ZMusic::Open() with same filename. (WAV,MOD,MID,OGG)
|
|
|
Destructor calls ZMusic::Release(). |
|
|
Open a music file to be used.
|
|
|
Release memory held by music data. |
|
||||||||||||
|
Play music currently loaded in ZMusic, looping loopNum times. (use ZMusic::LoopInfinite to loop forever.) If fade is not zero (which it defaults to) music will fade in over specified number of milliseconds.
|
|
|
Pause currently playing music. |
|
|
Unpause currently paused music. |
|
|
Rewind music to beginning. |
|
|
Stop currently playing music, if fadeTime is not zero, fade out over specified time.
|
|
|
Change volume of currently playing music.
|
|
|
Check if file is loaded and pointer to data is non-NULL.
|
|
|
Check if music is playing, specifically if it is not stopped. (Paused state should be checked for by IsPaused)
|
|
|
Check if music is "playing" but currently paused.
|
|
|
Get current volume of music represented as a value from 0-128.
|
1.3-rc2