Maxmod
Loading...
Searching...
No Matches
Macros
Playback events

Macros

#define MMCB_SONGERROR   0x2C
 There has been an error while playing the song.
 
#define MMCB_SONGFINISHED   0x2B
 A song has finished.
 
#define MMCB_SONGMESSAGE   0x2A
 A special effect has been found in a song.
 

Detailed Description

Macro Definition Documentation

◆ MMCB_SONGERROR

#define MMCB_SONGERROR   0x2C

There has been an error while playing the song.

The value of param is MM_MAIN or MM_JINGLE, depending on the song that has had the error.

At the moment, the only way this event can be triggered is if Maxmod is asked to play a song with more channels than available for the layer. Jingles always have 4 available channels. On DS, main modules have 32 available channels. On GBA, the user decides how many channels are available when calling mmInit() or mmInitDefault().

◆ MMCB_SONGFINISHED

#define MMCB_SONGFINISHED   0x2B

A song has finished.

This event occurs when a module has finished playing the last pattern and has stopped active status. param is MM_MAIN if the main module has finished or MM_JINGLE if the jingle has finished.

◆ MMCB_SONGMESSAGE

#define MMCB_SONGMESSAGE   0x2A

A special effect has been found in a song.

This event occurs when an SFx (S3M/IT) or EFx (MOD/XM) effect is parsed from the pattern data. If you have an event handler installed it will be forwarded to there.

Param contains 'x' from SFx/EFx in the 4 low bits, and the layer in the top 4 bits (MM_MAIN or MM_JINGLE).

For example, if the jingle is a S3M file with a SF2 effect, param will contain ((MM_JINGLE << 4) | 2).

The chosen effects aren't really used by most songs, it's your responsibility to add them to it to get events when you need them for your application.