Maxmod
Macros | Enumerations | Functions
maxmod.h File Reference

Global include of Maxmod for GBA. More...

#include <mm_types.h>

Macros

#define MM_SIZEOF_ACTCH   28
 Size of act channel (bytes)
 
#define MM_SIZEOF_MIXCH   24
 Size of mix channel (bytes)
 
#define MM_SIZEOF_MODCH   40
 Size of mod channel (bytes)
 
#define MMCB_SONGFINISHED   0x2B
 This event occurs when a module has finished playing the last pattern and has stopped active status. param == 0 if main module, == 1 otherwise (jingle)
 
#define MMCB_SONGMESSAGE   0x2A
 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 will contain 'x' from SFx/EFx.
 

Enumerations

enum  mm_mixlen_enum { MM_MIXLEN_8KHZ }
 Precalculated mix buffer lengths (in bytes) More...
 

Functions

mm_bool mmActive (void)
 Used to determine if a module is playing. More...
 
mm_bool mmActiveSub (void)
 Check if a jingle is playing or not. More...
 
mm_sfxhand mmEffect (mm_word sample_ID)
 Plays a sound effect with default settings. More...
 
mm_bool mmEffectActive (mm_sfxhand handle)
 Indicates if a sound effect is active or not. More...
 
mm_word mmEffectCancel (mm_sfxhand handle)
 Stops a sound effect. The handle will be invalidated. More...
 
void mmEffectCancelAll ()
 Stop all sound effects and reset the effect system.
 
mm_sfxhand mmEffectEx (mm_sound_effect *sound)
 Plays a sound effect with custom settings. More...
 
void mmEffectPanning (mm_sfxhand handle, mm_byte panning)
 Changes the panning of a sound effect. More...
 
void mmEffectRate (mm_sfxhand handle, mm_word rate)
 Changes the playback rate for a sound effect. More...
 
void mmEffectRelease (mm_sfxhand handle)
 Marks a sound effect as unimportant. More...
 
void mmEffectScaleRate (mm_sfxhand handle, mm_word factor)
 Scales the rate of the sound effect by a certain factor. More...
 
void mmEffectVolume (mm_sfxhand handle, mm_word volume)
 Changes the volume of a sound effect. More...
 
void mmFrame (void) __attribute((long_call))
 This is the main routine-function that processes music and updates the sound output. More...
 
mm_word mmGetPosition (void)
 Get current pattern order being played. More...
 
mm_word mmGetPositionRow (void)
 Get current row being played. More...
 
mm_word mmGetPositionTick (void)
 Get current number of elapsed ticks in the row being played. More...
 
void mmInit (mm_gba_system *setup)
 Initializes Maxmod with the settings specified. More...
 
void mmInitDefault (mm_addr soundbank, mm_word number_of_channels)
 Initialize Maxmod with default settings. More...
 
void mmJingle (mm_word module_ID)
 Plays a jingle. More...
 
void mmPause (void)
 Pauses playback of the active module. More...
 
void mmPlayModule (mm_word address, mm_word mode, mm_word layer)
 Play direct MAS file. More...
 
void mmPosition (mm_word position)
 Set the current sequence [aka order-list] position for the active module. More...
 
void mmResume (void)
 Resume module playback. More...
 
void mmSetEffectsVolume (mm_word volume)
 Set master volume scale for effect playback. More...
 
void mmSetEventHandler (mm_callback handler)
 Install handler to receive song events. More...
 
void mmSetJingleVolume (mm_word volume)
 Use this function to change the master volume scale for jingle playback. More...
 
void mmSetModulePitch (mm_word pitch)
 Change the master pitch scale for module playback. More...
 
void mmSetModuleTempo (mm_word tempo)
 Change the master tempo for module playback. More...
 
void mmSetModuleVolume (mm_word volume)
 Use this function to change the master volume scale for module playback. More...
 
static void mmSetPosition (mm_word position)
 Set playback position (alias for mmPosition()). More...
 
void mmSetVBlankHandler (void *function)
 Installs a custom handler to be processed after the sound DMA is reset. More...
 
void mmStart (mm_word id module_ID, mm_pmode mode)
 Begins playback of a module. More...
 
void mmStop (void)
 Stops playback of the active module. More...
 
void mmVBlank (void)
 This function must be linked directly to the VBlank IRQ. More...
 

Detailed Description

Global include of Maxmod for GBA.