40 #ifndef _audiomusicplayer_cpp
41 #define _audiomusicplayer_cpp
45 #include "Audio/sound.h"
69 if(Track == (*TrackIt)) {
virtual void Pause()=0
Pauses playback of the sound at it's current position in the stream.
TrackIterator GetIteratorToTrack(iSound *Track)
Gets an iterator to the iSound instance in the current playlist.
virtual Boole IsPlaying() const =0
Gets whether or not the sound is currently playing.
bool Boole
Generally acts a single bit, true or false.
Boole IsStopped() const
Gets whether or not the current selection is stopped.
virtual void Stop()=0
Stops playback of the sound and resets it's position back to the start.
Thrown when the requested identity could not be found.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
~MusicPlayer()
Class destructor.
Playlist * GetPlaylist() const
Gets the playlist in use by this music player.
void Next()
Advances to the next selection on the playlist.
virtual Boole Play()=0
Plays the sound with it's current configuration.
Boole EOPRepeat
Stores whether or not the player will loop back to the start when it finishes playing all tracks in t...
Audio::iSound * CurrTrack
A pointer to the currently selected track.
This implements the exception hiearchy for Mezzanine.
This is an interface class for a non-spacialized sound.
Boole ContainsSound(iSound *TheSound)
Checks the playlist to see if it contains a sound.
void SetPlaylistRepeat(Boole Repeat)
Sets whether the playlist should return to the start after it reaches the end of the list...
void Play()
Plays the current selection.
This class is a list of sounds with common playlist features.
void SetPlaylistShuffle(Boole Shuffle)
Sets whether the playlist should shuffle it's contents after it reaches the end of the list...
Audio::Playlist * MusicPlaylist
A pointer to the active playlist used by this player.
The declaration of the Playlist class.
MusicPlayer()
Class constructor.
Thrown when the available information should have worked but failed for unknown reasons.
void Pause()
Pauses the current selection.
void Stop()
Stops the current selection.
Boole GetPlaylistRepeat() const
Gets wether playlist repeat is enabled.
Boole IsPaused() const
Gets whether or not the current selection is paused.
void Shuffle()
Randomly shuffles the content in the Playlist.
Boole GetPlaylistShuffle() const
Gets wether playlist shuffle is enabled.
The bulk of the engine components go in this namspace.
void Update()
Called on by the AudioManager to perform all music player responsibilities.
virtual Boole IsPaused() const =0
Gets whether or not the sound is currently paused.
void SwitchToTrack(iSound *Track)
Sets the specified track as the current track.
virtual Boole IsStopped() const =0
Gets whether or not the sound is currently stopped.
Boole Playing
Stores whether or not this player is currently playing.
std::list< Audio::iSound * >::iterator TrackIterator
Convenience type for track iterators from playlists.
Boole ContainsSong(iSound *Track) const
Checks the set playlist to see if it contains a track.
The interface for the Musicplayer class.
void Previous()
Moves back to the previous selection on the playlist.
A base type that provides container features for different tracks.
Boole EOPShuffle
Stores whether or not the player will shuffle the playlist when it finishes playing all the tracks in...
Boole IsPlaying() const
Gets whether or not the current selection is playing.
Boole ManualStop
Stores whether or not the current track has been manually stopped.