#163063 - wink99_th - Sun Sep 21, 2008 3:31 am
now I can play music by using mikmod lib. but i would like to play sound effect (wave file). I use libnds play SFX like this
I play SFX alone. It's work. But when I mix between music and SFX, the SFX is weird sound. So i want to change to use mikmod SFX ( play SAMPLE). In mikmod doucument,I think it show how to use function in PC not in NDS. for example
Could someone show me the example code to play SFX by mikmod?
Code: |
void SFX_click() { TransferSoundData click = { click_raw, /* Sample address */ click_raw_size, /* Sample length */ 11025, /* Sample rate */ 127, /* Volume */ 64, /* panning */ 1 /* format */ }; playSound(&click); } |
I play SFX alone. It's work. But when I mix between music and SFX, the SFX is weird sound. So i want to change to use mikmod SFX ( play SAMPLE). In mikmod doucument,I think it show how to use function in PC not in NDS. for example
Code: |
/* load samples */ sfx1 = Sample_Load("first.wav"); |
Could someone show me the example code to play SFX by mikmod?