Introduction
Downloads
Documentation
Tutorials
Pixie Lite
Forum

Home

Music Class Reference
[Audio]

List of all members.


Public Member Functions

 Music (const Asset &asset)
 ~Music ()
void SetLooping (bool looping)
void Play ()
void Stop ()
void Pause ()
bool IsPlaying ()
float GetLength ()
float GetPosition ()
void SetPosition (float position)
float GetVolume ()
void SetVolume (float level)

Friends

class Audio

Detailed Description

Author:
Mattias Gustavsson

Definition at line 22 of file Music.h.


Constructor & Destructor Documentation

Music::Music ( const Asset asset  ) 

Constructor

Definition at line 16 of file Music.cpp.

Music::~Music (  ) 

Destructor

Definition at line 50 of file Music.cpp.


Member Function Documentation

void Music::SetLooping ( bool  looping  ) 

Specifies whether this track should be looping or not. A looping track will start over automatically when the end is reached. The default is non-looping

Definition at line 67 of file Music.cpp.

void Music::Play (  ) 

Resumes (or starts) playback of the music from the current position

Definition at line 75 of file Music.cpp.

void Music::Stop (  ) 

Stops the playback of the music, and resets position to 0

Definition at line 98 of file Music.cpp.

void Music::Pause (  ) 

Halts playback of the music, but doesn't reset position

Definition at line 112 of file Music.cpp.

bool Music::IsPlaying (  ) 

Returns true if the music is currently playing, and false if it has been stopped (by calling the Stop method or by reaching the end if playing without looping)

Definition at line 130 of file Music.cpp.

float Music::GetLength (  ) 

Returns the length of the track in seconds

Definition at line 138 of file Music.cpp.

float Music::GetPosition (  ) 

Returns the current position of the track in seconds from the start

Definition at line 151 of file Music.cpp.

void Music::SetPosition ( float  position  ) 

Sets the current position of the track in seconds from the start

Definition at line 180 of file Music.cpp.

float Music::GetVolume (  ) 

Returns the current volume level in the range 0.0 to 1.0

Definition at line 346 of file Music.cpp.

void Music::SetVolume ( float  level  ) 

Sets the current volume level in the range 0.0 to 1.0

Definition at line 359 of file Music.cpp.


Friends And Related Function Documentation

friend class Audio [friend]

Definition at line 92 of file Music.h.



Pixie University and the Pixie Game Engine is created and managed by Mattias Gustavsson.
Reproduction/republishing of any material on this site without permission is strictly prohibited.