#include <sdlmusiclist.h>
Public Member Functions | |
DECLSPEC | SdlMusicInfo (const char *fn, const char *title, const char *author, int secs=-1) |
DECLSPEC void | setFileName (const char *n) |
const char * | getFileName () |
| |
DECLSPEC void | setTitle (const char *t) |
const char * | getTitle () |
| |
DECLSPEC void | setAuthor (const char *a) |
const char * | getAuthor () |
| |
void | setLength (int l) |
int | numPlayed () |
| |
void | played () |
void | reset () |
This class manages the filename, author, title and duration information of a song.
SdlMusicInfo::SdlMusicInfo | ( | const char * | fn, | |
const char * | title, | |||
const char * | author, | |||
int | secs = -1 | |||
) |
Constructor. Manages to store filename, title and author to the concerning variables.
fn | the filename of the song | |
title | the title, or however you want to use it | |
author | the author, or however you want to use it | |
secs | the length of the song in seconds |
void SdlMusicInfo::setFileName | ( | const char * | n | ) |
Changes the filename of the song.
n | the new filename |
void SdlMusicInfo::setTitle | ( | const char * | t | ) |
Changes the title-info of the song.
t | the new title |
void SdlMusicInfo::setAuthor | ( | const char * | a | ) |
Changes the author-info.
a | the new author |
void SdlMusicInfo::setLength | ( | int | l | ) | [inline] |
Changes the duration-info of the song.
l | the new length in seconds |
void SdlMusicInfo::played | ( | ) | [inline] |
Call it, when the song has been played. Increments the played-counter.
void SdlMusicInfo::reset | ( | ) | [inline] |
Resets the played-counter to zero.