Maxmod
Macros | Functions
maxmod9.h File Reference

Global include of Maxmod for DS (ARM9 side). More...

#include <mm_types.h>

Macros

#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.
 

Functions

mm_bool mmActive (void)
 Used to determine if a module is playing. More...
 
mm_sfxhand mmEffect (mm_word sample_ID)
 Plays a sound effect with default settings. More...
 
void mmEffectCancel (mm_sfxhand handle)
 Stops a sound effect. The handle will be invalidated. More...
 
void mmEffectCancelAll (void)
 Stop all sound effects and reset the effect system.
 
mm_sfxhand mmEffectEx (mm_sound_effect *sound)
 Plays a sound effect with custom settings. More...
 
mm_sfxhand mmEffectExt (mm_sound_effect *sound, mm_ds_sample *sample)
 Play external sound. 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 mmInit (mm_ds_system *system)
 Initializes Maxmod with the settings specified. More...
 
void mmInitDefault (char *soundbank_file)
 Initialize Maxmod with default settings. More...
 
void mmInitDefaultMem (mm_addr soundbank)
 Initialize Maxmod with default settings. More...
 
void mmJingle (mm_word module_ID)
 Plays a jingle. More...
 
void mmLoad (mm_word module_ID)
 Loads a module into memory for playback. More...
 
void mmLoadEffect (mm_word sample_ID)
 Loads a sound effect into memory for playback. More...
 
void mmLockChannels (mm_word bitmask)
 Lock audio channels to prevent Maxmod from using them. More...
 
void mmPause (void)
 Pauses playback of the active module. 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...
 
static mm_word mmReverbBufferSize (mm_word bit_depth, mm_word sampling_rate, mm_word delay)
 This calculates the amount of memory needed for the reverb buffer. More...
 
void mmReverbConfigure (mm_reverb_cfg *config)
 Configures the reverb system. More...
 
void mmReverbDisable (void)
 Disables the reverb system and restores the channels. More...
 
void mmReverbEnable (void)
 Enables the reverb system. More...
 
void mmReverbStart (mm_reverbch channels)
 Starts reverb output in the selected channels. More...
 
void mmReverbStop (mm_reverbch channels)
 Stops reverb output for the selected channels. More...
 
void mmSelectMode (mm_mode_enum mode)
 Switches the audio mode for Maxmod DS. More...
 
void mmSetCustomSoundBankHandler (mm_callback p_loader)
 Install a custom routine to interface with the soundbank data. 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...
 
void mmSoundBankInFiles (char *filename)
 Setup the standard interface for a soundbank that is loaded in the file system. More...
 
void mmSoundBankInMemory (mm_addr address)
 Enable the standard interface for a soundbank that is loaded into memory. More...
 
void mmStart (mm_word module_ID, mm_pmode mode)
 Begins playback of a module. More...
 
void mmStop (void)
 Stops playback of the active module. More...
 
void mmStreamClose (void)
 Close audio stream.
 
mm_word mmStreamGetPosition (void)
 Get number of samples elapsed since the stream was opened. More...
 
void mmStreamOpen (mm_stream *stream)
 Opens an audio stream. More...
 
void mmStreamUpdate (void)
 Check buffering state and fill stream with data. More...
 
void mmUnload (mm_word module_ID)
 Unloads and frees memory space occupied by a module. More...
 
void mmUnloadEffect (mm_word sample_ID)
 Unloads a sound effect and frees the memory if the reference count becomes zero. More...
 
void mmUnlockChannels (mm_word bitmask)
 Unlocks audio channels to allow Maxmod to use them. More...
 

Detailed Description

Global include of Maxmod for DS (ARM9 side).