Music Class Reference

The Music class. More...

#include <Sound/Font.h>

List of all members.

Public Member Functions

 Music ()
 Default constructor.
 Music (const char *file)
 Constructor that loads the specified music file.
bool IsValid () const
 Returns true is the Music stream is valid, false otherwise.
void Load (const char *file, bool useResourcePath=true)
 Loads the specified music file.
void SetVolume (byte newVol)
 Sets the volume of the music.
byte GetVolume () const
 Gets the volume of the music.
void GetLevels (float &left, float &right)
 Gets the current levels of the stream.
bool IsPlaying ()
 Determines if the music file is currently playing.
void Play ()
 Plays the currently loaded music file.
void Stop ()
 Stops playing the music file.
void Pause ()
 Pauses playing the music file. The next call to Play will begin at the point Pause was called.

Detailed Description

The Music class.

A class that loads and plays Music. The following sound formats are supported:

  1. WAV
  2. MP2
  3. MP3
  4. OGG
  5. RAW

NOTE: Music is not shared between duplicate Music classes.


Constructor & Destructor Documentation

Music::Music ( const char *  file  )  [inline]

Constructor that loads the specified music file.

Parameters:
[in] file the filename of the music file to load.

Member Function Documentation

void Music::GetLevels ( float &  left,
float &  right 
)

Gets the current levels of the stream.

Parameters:
[out] left the levels for the left channel.
[out] right the levels for the right channel.
byte Music::GetVolume (  )  const

Gets the volume of the music.

Returns:
The new sound value between 0 (silent) and 255 (unneccessarily loud).
bool Music::IsPlaying (  ) 

Determines if the music file is currently playing.

Returns:
True if the sound is playing, false otherwise.
void Music::Load ( const char *  file,
bool  useResourcePath = true 
)

Loads the specified music file.

Parameters:
[in] file the filename of the music file to load.
[in] useResourcePath set to true to use the currently set resource path. Defaults to true.
void Music::SetVolume ( byte  newVol  ) 

Sets the volume of the music.

Parameters:
[in] newVol the new volume between 0 (silent) and 255 (unneccessarily load).

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