gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Audio > MOD_ and SFX_ files difference

#177083 - blessingta@hotmail.co.uk - Thu Dec 08, 2011 3:25 am

What the difference between sound files converted to MOD_ format and SFX_format? Is it that SFX is good for sound effects whilst MOD_format is for looping music?


GBA sound issue:

Why wont the mod files loop properly like SFX ? The crazyfrog example below is my attempt at making a mod file into a music loop in the same way, the ambulance example was used.

Any explanations?

Code:
#define MOD_AXELF 0
#define SFX_AMBULANCE 31
#define SFX_BOOM 32
#define MOD_FLATOUTLIES 1
#define MOD_BEEP 2

//crazy_frog
mm_sound_effect _crazy_frog= {
{ MOD_AXELF } , // id
(int)(1.0f * (1<<10)), // rate
0, // handle
255, // volume
255, // panning
};
crazy_frog = _crazy_frog;

#177093 - sverx - Fri Dec 09, 2011 1:27 pm

SFXs are single sound effects, whilst MODs are MODules, which are kind of MIDI files plus instrument samples (simplistic definition)
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary