mikmodlib and end of song crash

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
hardhat
Posts: 17
Joined: Thu Mar 02, 2006 9:42 am
Contact:

mikmodlib and end of song crash

Post by hardhat »

I'm having a strange problem with mikmodlib. I've been working on it with two different .XM songs and after the background music finishes playing, the audio thread crashes with a Breakpoint exception. I just don't understand.

Exception - Breakpoint
Thread ID - 0x044B8E31
Th Name - audiot0
Module ID - 0x044E830D
Mod Name - Last Call
EPC - 0x0893E660
Cause - 0x00000024
BadVAddr - 0x14212800
Status - 0x20008613
zr:0x00000000 at:0x0008FF00 v0:0x0000FB3D v1:0x0000022A
a0:0x000104C2 a1:0x0001FFFF a2:0x08A70000 a3:0xFFF84000
t0:0x000104C2 t1:0x08A7A2F8 t2:0x0001FFFF t3:0x08C1DD10
t4:0x08A79FF0 t5:0x08A79FF0 t6:0x0000001F t7:0x00000000
s0:0x08C2FEA0 s1:0x0000007C s2:0x00000372 s3:0x08C1C180
s4:0x0000001F s5:0x0000022A s6:0x00000000 s7:0x08C2EC94
t8:0x00000000 t9:0x08C2EC9C k0:0x09FFEF00 k1:0x00000000
gp:0x089660C0 sp:0x09FFEE00 fp:0x08C2ECC4 ra:0x0893E0E8


psp-addr2line reveals:
/home/dalew/psp/packages/mikmodlib/playercode/virtch.c +806 which says:

Code: Select all

 
done = MIN((end - vnf->current) / vnf->increment + 1, todo);
psp-insight tells me that vnf->current=0 and vnf->increment=1024 and todo=0. It all seems okay to me. Where do I need to go from here? All I want is looping background music. I start the song with:

Code: Select all

        _mm_RegisterErrorHandler(mikmodErrorHandler);
        MikMod_RegisterAllLoaders();
        MikMod_RegisterAllDrivers();
        md_mode = DMODE_16BITS|DMODE_STEREO|DMODE_SOFT_SNDFX|DMODE_SOFT_MUSIC;
        md_reverb = 0;
        md_pansep = 128;
        MikMod_Init();
        MikMod_SetNumVoices(-1, 8);

        song[MUS_INTRO]=MikMod_LoadSong(musicfilename[MUS_INTRO],128);
        Player_Start(song[MUS_INTRO]);
it looks good relative to the example player. Maybe it is just the specific songs have strange things in them, I just don't know.
Post Reply