|
| Track (const std::string &filename) |
| Initializes the track from the sound described in the filename The sound can be abc, midi, mp3 The volume is at max, repeat is set to false, speed is set to 1 the sound is in pause, and mute is set to false. More...
|
|
| Track () |
| Creates an invalid Track The volume is at max, repeat is set to false, speed i set to 1 and mute is set to false.
|
|
| Track (const Track &)=delete |
|
Track & | operator= (const Track &)=delete |
|
void | play () |
| If the Track is valid, plays the sound.
|
|
void | pause () |
| If the Track is valid, pauses the sound.
|
|
Time | getDuration () const |
| If the track is valid, returns the duration of the sound at the current speed, otherwise, returns 0. More...
|
|
void | setVolume (float vol) |
| Sets the Volume of the sound (or sets the volume for future use). This function does not unmute if it is mute. More...
|
|
float | getVolume () const |
| Returns the volume of the sound independently of its validity The value does not depend on the "mute" state. More...
|
|
void | setSound (const std::string &filename) |
| Sets the Track to a new Sound The speed is reset to the speed of the new Sound, the volume, the repeat and mute options are kept unchanged. More...
|
|
| operator bool () const |
|
void | mute () |
| Mutes the sound.
|
|
void | unmute () |
| Unmutes the Sound.
|
|
bool | isMute () const |
| return whether the sound is muted (independently of its validity)
|
|
void | setSpeed (float s) |
| Sets the speed. A speed of 2 corresponds to twice the normal speed. More...
|
|
float | getSpeed () const |
| returns the speed
|
|
void | close () |
| Closes the sound (The Track becomes invalid)
|
|
void | setRepeat (bool repeat) |
| Set the repeat option independently of the validity of the track.
|
|
bool | getRepeat () const |
| Return the repeat state independently of the validity of the track.
|
|
void | setPosition (const Time &t) |
| If the track is valid, sets the position in the track, otherwise it does nothing.
|
|
Time | getPosition () const |
| Returns the position in the Track (taking the speed into account) if the Track is valid, 0 otherwise.
|
|
| ~Track () |
| The Music stops when the object is destroyed.
|
|
void | stop () |
|
bool | isFinished () const |
|
bool | isPaused () const |
|