#include <ZE_ZMusic.h>
Inherits ZE::ZObject.
| Public Methods | |
| ZMusic () | |
| Default Constructor. | |
| ZMusic (string filename) | |
| Constructor that opens a music file. | |
| ~ZMusic () | |
| Destructor, frees memory. | |
| void | Open (string filename) | 
| Opens a music file. | |
| void | Release () | 
| Release music. | |
| void | Play (int loopNum=0, int fadeTime=0) | 
| Play currently loaded music. | |
| void | Pause () | 
| Pause music. | |
| void | Unpause () | 
| Unpause music. | |
| void | Rewind () | 
| Rewind music. | |
| void | Stop (int fadeTime=0) | 
| Stop music. | |
| void | SetVolume (int volume) | 
| Change Volume. | |
| bool | IsLoaded () | 
| Check if file is loaded. | |
| bool | IsPlaying () | 
| Check if music is Playing. | |
| bool | IsPaused () | 
| Check if music is Paused. | |
| int | Volume () | 
| Find Current Volume of Music. | |
| Static Public Attributes | |
| const int | LoopInfinite | 
| Static Variable For Infinite loop of sound. (Defined as -1). | |
| Protected Attributes | |
| 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
1.3-rc2