Maxmod
Loading...
Searching...
No Matches
Functions
Jingle Playback

Functions

static mm_bool mmActiveSub (void)
 Check if a jingle is playing or not.
 
static void mmJingle (mm_word module_ID)
 Plays a jingle.
 
mm_bool mmJingleActive (void)
 Check if a jingle is playing or not.
 
void mmJinglePause (void)
 Pauses playback of the active jingle.
 
void mmJingleResume (void)
 Resume jingle playback.
 
mm_word mmJingleStart (mm_word module_ID, mm_pmode mode)
 Plays a jingle.
 
void mmJingleStop (void)
 Stops playback of the active jingle.
 
void mmSetJinglePitch (mm_word pitch)
 Change the master pitch scale for jingle playback.
 
void mmSetJingleTempo (mm_word tempo)
 Change the master tempo for jingle playback.
 
void mmSetJingleVolume (mm_word volume)
 Use this function to change the master volume scale for jingle playback.
 

Detailed Description

Function Documentation

◆ mmActiveSub()

static mm_bool mmActiveSub ( void  )
inlinestatic

Check if a jingle is playing or not.

Deprecated:
Alias of mmJingleActive().
Returns
Returns nonzero if a jingle is actively playing.

◆ mmJingle()

static void mmJingle ( mm_word  module_ID)
inlinestatic

Plays a jingle.

Deprecated:
Use mmJingleStart() instead.
Parameters
module_IDIndex of module to be played. (Defined in soundbank header)

◆ mmJingleActive()

mm_bool mmJingleActive ( void  )

Check if a jingle is playing or not.

Returns
Returns nonzero if a jingle is actively playing.

◆ mmJinglePause()

void mmJinglePause ( void  )

Pauses playback of the active jingle.

Resume with mmJingleResume().

◆ mmJingleResume()

void mmJingleResume ( void  )

Resume jingle playback.

Pause with mmJinglePause().

◆ mmJingleStart()

mm_word mmJingleStart ( mm_word  module_ID,
mm_pmode  mode 
)

Plays a jingle.

Jingles are normal modules that can be mixed with the normal module playback.

For GBA, the module is read directly from the cartridge space.

Note that jingles must be limited to 4 channels only.

Warning
In DS, make sure the module is loaded with mmLoad() first.
Parameters
module_IDIndex of module to be played. (Defined in soundbank header)
modeMode of playback. Can be MM_PLAY_LOOP (play and loop until stopped manually) or MM_PLAY_ONCE (play until end).
Returns
Non-zero on success, zero on error.

◆ mmJingleStop()

void mmJingleStop ( void  )

Stops playback of the active jingle.

Start again (from the beginning) with mmJingleStart().

Any channels used by the active module will be freed.

◆ mmSetJinglePitch()

void mmSetJinglePitch ( mm_word  pitch)

Change the master pitch scale for jingle playback.

Specifying 1024 will play the jingle at its normal pitch. Minimum/Maximum range of the pitch change is +-1 octave.

Range = 0x200 -> 0x800 = 0.5 -> 2.0

Parameters
pitchNew pitch scale. Value = 1024 * 2^(semitones/12)

◆ mmSetJingleTempo()

void mmSetJingleTempo ( mm_word  tempo)

Change the master tempo for jingle playback.

Specifying 1024 will play the jingle at its normal speed. Minimum and maximum values are 50% (512) and 200% (2048). Note that increasing the tempo will also increase the jingle processing load.

It uses a fixed point (Q10) value representing tempo.

Range = 0x200 -> 0x800 = 0.5 -> 2.0

Parameters
tempoNew tempo value. Tempo = (speed_percentage * 1024) / 100.

◆ mmSetJingleVolume()

void mmSetJingleVolume ( mm_word  volume)

Use this function to change the master volume scale for jingle playback.

Parameters
volumeNew volume level. Ranges from 0 (silent) to 1024 (normal).