libdragon
|
Player for the .YM64 module format (Arkos Tracker 2) More...
Data Structures | |
struct | ym5header |
Header of a YM5 file. More... | |
Functions | |
void | ym64player_open (ym64player_t *player, const char *fn, ym64player_songinfo_t *info) |
Open a YM64 file for playback. | |
int | ym64player_num_channels (ym64player_t *player) |
Return the number of channels used in the mixer for playback. | |
void | ym64player_play (ym64player_t *player, int first_ch) |
Start playback of a YM file. | |
void | ym64player_stop (ym64player_t *player) |
Stop YM playback. | |
void | ym64player_duration (ym64player_t *player, int *len, float *secs) |
Read the total duration the YM module. | |
void | ym64player_tell (ym64player_t *player, int *pos, float *secs) |
Read the current position of the YM module. | |
bool | ym64player_seek (ym64player_t *player, int pos) |
Seek to a specific position in the YM module. | |
void | ym64player_close (ym64player_t *player) |
Close and deallocate the YM64 player. | |
Player for the .YM64 module format (Arkos Tracker 2)
struct ym5header |
Header of a YM5 file.
void ym64player_open | ( | ym64player_t * | player, |
const char * | fn, | ||
ym64player_songinfo_t * | info | ||
) |
Open a YM64 file for playback.
[in] | player | YM64 player to initialize |
[in] | fn | Filename of the XM64 (with filesystem prefix, e.g. rom:// ). |
[out] | info | Optional structure to fill with information on the song (pass NULL if not needed) |
int ym64player_num_channels | ( | ym64player_t * | player | ) |
Return the number of channels used in the mixer for playback.
Depending on the AY emulator compile-time settings, this could be either 1 or 2 (mono or stereo). Notice that the YM64 currently mixes itself the 3 internal channels of the AY8910 chip, so only a final output stream is passed to the mixer.
[in] | player | YM64 player |
void ym64player_play | ( | ym64player_t * | player, |
int | first_ch | ||
) |
Start playback of a YM file.
[in] | player | YM64 player |
[in] | first_ch | First mixer channel to use for playback |
void ym64player_stop | ( | ym64player_t * | player | ) |
Stop YM playback.
The YM module will keep the current position. Use ym64player_play to continue playback.
void ym64player_duration | ( | ym64player_t * | player, |
int * | len, | ||
float * | secs | ||
) |
Read the total duration the YM module.
The function returns the total duration of the YM module, in ticks (internal YM position) or seconds. You can pass NULL to information that you are not interested in receiving.
[in] | player | YM64 player |
[out] | len | Total duration in ticks |
[out] | secs | Total duration in seconds |
void ym64player_tell | ( | ym64player_t * | player, |
int * | pos, | ||
float * | secs | ||
) |
Read the current position of the YM module.
The function returns the current position expressed in ticks (internal YM position), and also expressed as number of seconds. You can pass NULL to information that you are not interested in receiving.
[in] | player | YM64 player |
[out] | pos | Current position in ticks |
[out] | secs | Current position in seconds |
bool ym64player_seek | ( | ym64player_t * | player, |
int | pos | ||
) |
Seek to a specific position in the YM module.
The function seeks to a new absolute position expressed in ticks (internal YM position). Notice that it's not possible to seek in a YM64 file that has been compressed. audioconv64 compresses YM files by default.
[in] | player | YM64 player |
[out] | pos | Absolute position in ticks |