MusicPlayer Class Reference

The MusicPlayer class. More...

#include <Sound/MusicPlayer.h>

List of all members.

Public Types

enum  RepeatMode { REPEAT_OFF = 0, REPEAT_ON, REPEAT_SINGLE }
 

Defines the differant repeat modes the music player supports.

More...

Public Member Functions

 MusicPlayer ()
 Default Constructor.
 MusicPlayer (const Playlist &pl)
 Constructor.
void SetPlaylist (const Playlist &pl)
 Sets the Music players playlist.
const PlaylistGetPlaylist () const
 Returns the current playlist.
Playlist::ConstIterator GetCurrentSongIterator () const
 Returns a constant playlist iterator to the current song.
RepeatMode GetRepeatMode () const
 Returns the currently set repeat mode.
void SetRepeatMode (RepeatMode mode)
 Sets the music players repeat mode.
byte GetVolume () const
 Gets the volume of the music player.
void SetVolume (byte v)
 Sets the volume of the music player.
void MoveToStart ()
 Moves to the start of the playlist.
void MoveToEnd ()
 Moves to the end of the playlist.
void Next ()
 Advances to the next song in the playlist.
void Previous ()
 Advances to the previous song in the playlist.
bool Play ()
 Plays the currently active song.
void Stop ()
 Stops playing the current song.
void Pause ()
 Pauses the currently active song.
bool IsPaused ()
 Returns true if the current song is paused.
bool IsStopped ()
 Returns true if the music player is stopped.
bool IsSongDone ()
 Returns true if the currently playing song is done.
void FadeOut (float time)
 Fades out the currently playing song in the specified amount of time.
void Update (float dt)
 Called each frame.

Detailed Description

The MusicPlayer class.


Member Enumeration Documentation

Defines the differant repeat modes the music player supports.

Enumerator:
REPEAT_OFF 

No repeating is done.

REPEAT_ON 

Repeats the playlist.

REPEAT_SINGLE 

Repeates on a single song.


Constructor & Destructor Documentation

MusicPlayer::MusicPlayer ( const Playlist pl  ) 

Constructor.

Parameters:
[in] pl the playlist to use.

Member Function Documentation

void MusicPlayer::FadeOut ( float  time  ) 

Fades out the currently playing song in the specified amount of time.

Parameters:
[in] time the time in seconds to fade out the song.

Once the fade out time is reached the song is paused.

bool MusicPlayer::Play (  ) 

Plays the currently active song.

Returns:
true if the song is playing, false otherwise.
void MusicPlayer::SetPlaylist ( const Playlist pl  )  [inline]

Sets the Music players playlist.

Parameters:
[in] pl the playlist to use.
void MusicPlayer::Update ( float  dt  ) 

Called each frame.

Parameters:
[in] dt the time in seconds since the last frame.

NOTE: Only needed if you want the music player to manage moving from song to song.


The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:06 2010 for BrickOut |ReDuX| by  doxygen 1.6.3