Functions
AKG_Play
void AKG_Play(
u8 sng,
const voiddata
)

Initialize a music and start playback

Paramaters
num

Sub-music number if the AKG contain several musics (otherwise set to 0)

data

Pointer to the music data (data must be export to be replayed at this exact location) Check Arkos Tracker documentation for more details: https://​www​.julien-nevo​.com​/arkostracker

AKG_IsPlaying
inline bool AKG_IsPlaying()

Check if a music is currently playing

Return

FALSE if no music is playing

AKG_SetEventCallback
inline void AKG_SetEventCallback(
AKG_Event callback
)

Set the event callback function. It will be called when an event is triggered.  If ARKOS_USE_EVENT is TRUE, this function MUST be called before any call to AKG_Update.

Paramaters
callback

Pointer to the event callback function

AKG_Stop
void AKG_Stop()

Stop current music playback

AKG_Update
bool AKG_Update()

Decode a music frame and update the PSG (must be called once each frame)

Return

TRUE if end of music have been reached

AKG_InitSFX
u8 AKG_InitSFX(
const voiddata
)

Initialize sound effects. It MUST be called at any time before a first sound effect is triggered.  It doesn't matter whether a song is playing or not, or even if AKG_Init has been initialized.

Paramaters
data

Address to the sound effects data.

Return

Number of SFX in the package

AKG_PlaySFX
void AKG_PlaySFX(
u8 sfx,
u8 chan,
u8 vol
)

Plays a sound effect. If a previous one was already playing on the same channel, it is replaced.  This does not actually plays the sound effect, but programs its playing.

Paramaters
sfx

Sound effect number (>0!).

chan

The channel where to play the sound effect (0, 1, 2).

vol

Inverted volume (0 = full volume, 16 = no sound). Hardware sounds are also lowered.

AKG_StopSFX
void AKG_StopSFX(
u8 chan
)

Stops a sound effect. Nothing happens if there was no sound effect.

Paramaters
chan

The channel where to stop the sound effect (0, 1, 2).