Maxmod
Functions
NDS: ARM7 Initialization/Main Functions

Functions

void mmFrame (void)
 This is the main routine-function that processes music and updates the sound output. More...
 
void mmInstall (int fifo_channel)
 Installs the Maxmod system on the ARM7 side. More...
 
mm_bool mmIsInitialized (void)
 Returns whether or not the system is initialized and ready for playback. More...
 
void mmLockChannels (mm_word bitmask)
 Lock audio channels to prevent Maxmod from using them. More...
 
void mmSelectMode (mm_mode_enum mode)
 Switches the audio mode for Maxmod DS. More...
 
void mmUnlockChannels (mm_word bitmask)
 Unlocks audio channels to allow Maxmod to use them. More...
 

Detailed Description

Function Documentation

◆ mmFrame()

void mmFrame ( void  )

This is the main routine-function that processes music and updates the sound output.

For DS (ARM7), this function is called automatically.

◆ mmInstall()

void mmInstall ( int  fifo_channel)

Installs the Maxmod system on the ARM7 side.

Normally, this is the only function you need to call on ARM7.

Parameters
fifo_channelFIFO communication channel to use. Must equal the channel the ARM9 side will be sending data to. (usually FIFO_MAXMOD)

◆ mmIsInitialized()

mm_bool mmIsInitialized ( void  )

Returns whether or not the system is initialized and ready for playback.

Returns
Non-zero if the system is initialized, zero otheriwse.

◆ mmLockChannels()

void mmLockChannels ( mm_word  bitmask)

Lock audio channels to prevent Maxmod from using them.

This is for when you need to operate on the DS hardware channels directly. Note that if you use this function while music or sound effects are playing, any active notes that are using the channels to be locked will be cut.

Parameters
bitmaskSelection of channels to lock. Bit0 = Channel0, Bit1 = Channel1 ... Bit15 = Channel15

◆ mmSelectMode()

void mmSelectMode ( mm_mode_enum  mode)

Switches the audio mode for Maxmod DS.

Hardware mixing offers 16-channel audio with minimal CPU load.

Interpolated mixing extends the capability of the hardware channels by adding linear interpolation in software.

Extended mixing increases the channel count to 30 with software mixing.

Parameters
modeNew audio mode. Pass MM_MODE_A for complete hardware mixing, MM_MODE_B for interpolated mixing, or MM_MODE_C for extended mixing.

◆ mmUnlockChannels()

void mmUnlockChannels ( mm_word  bitmask)

Unlocks audio channels to allow Maxmod to use them.

This function can be used to restore channel usage to Maxmod when you are finished using certain channels.

Note that in the "Interpolated Audio" mode, channels can not be unlocked. To unlock channels in the interpolated mode you must reset the audio system. To reset the audio system, use mmSelectMode.

Parameters
bitmaskSelection of channels to unlock. Bit0 = Channel0, Bit1 = Channel1, Bit2 = Channel2 ... Bit15 = Channel15