Player for the .YM64 module format (Arkos Tracker 2)
More...
Player for the .YM64 module format (Arkos Tracker 2)
- Author
- Giovanni Bajo giova.nosp@m.nnib.nosp@m.ajo@g.nosp@m.mail.nosp@m..com
◆ ym5header
Data Fields |
uint32_t |
nframes |
Number of audioframes. |
uint32_t |
attrs |
Attributes (bit 0: interleaved format) |
uint16_t |
ndigidrums |
Number of digital samples. |
uint32_t |
chipfreq |
Frequency of the emulated chip. |
uint16_t |
playfreq |
Playback frequency in audioframes per seconds (eg: 50) |
uint32_t |
loop |
Audioframe where the loop starts. |
uint16_t |
sizeext |
Extension (always 0) |
◆ ym64player_open()
Open a YM64 file for playback.
- Parameters
-
[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) |
◆ ym64player_num_channels()
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.
- Parameters
-
- Returns
- Number of mixer channels.
◆ ym64player_play()
void ym64player_play |
( |
ym64player_t * |
player, |
|
|
int |
first_ch |
|
) |
| |
Start playback of a YM file.
- Parameters
-
[in] | player | YM64 player |
[in] | first_ch | First mixer channel to use for playback |
◆ ym64player_stop()
Stop YM playback.
The YM module will keep the current position. Use ym64player_play to continue playback.
◆ ym64player_duration()
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.
- Parameters
-
[in] | player | YM64 player |
[out] | len | Total duration in ticks |
[out] | secs | Total duration in seconds |
◆ ym64player_tell()
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.
- Parameters
-
[in] | player | YM64 player |
[out] | pos | Current position in ticks |
[out] | secs | Current position in seconds |
◆ ym64player_seek()
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.
- Parameters
-
[in] | player | YM64 player |
[out] | pos | Absolute position in ticks |
- Returns
- True if it was possible to seek, false if the file is compressed.