Functions
AKM_IsPlaying
inline bool AKM_IsPlaying()

Initialize music and start playback

AKM_Init
void AKM_Init(
const voiddata,
u8 sng
)

Initialize music and start playback

Paramaters
data

Pointer to the music data

num

Music number

AKM_Stop
void AKM_Stop()

Stop music playback

AKM_Decode
bool AKM_Decode()

Decode a music frame and update the PSG

AKM_InitSFX
u8 AKM_InitSFX(
const voiddata
)

Initializes the sound effects. It MUST be called at any times before a first sound effect is triggered.  It doesn't matter whether the song is playing or not, or if it has been initialized or not.

Paramaters
data

Address to the sound effects data.

Return

Number of SFX in the package

AKM_PlaySFX
void AKM_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.

AKM_StopSFX
void AKM_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).