I have a .xm file which i want to play on my ipaq 3870. It plays fine under winamp, but causes a crash, when the ipaq tries to play it using fmodce.

The url is http://www.dodgyposse.com/fmod/soap.xm

I have the file stored in my app as a resource, and am loading it from memory. It loads ok, but as soon as i play it, the app crashes.

If anyone has any ideas what is causing this i would appreciate some feedback!

Derrick Dixon

  • You must to post comments

The xm is imported into my resources as an “XM”, and then, I use the following code to get the resource

void loadXM( HMODULE mod ,int resourceId )
HRSRC rsrc = FindResource( mod,MAKEINTRESOURCE( resourceId ),_T(“XM”));
DWORD size = SizeofResource( mod,rsrc );
HGLOBAL mHandle = LoadResource( mod,rsrc );
const char *mPtr = (const char *) LockResource( mHandle );

m_mod = FMUSIC_LoadSongMemory((void*)mPtr, (int)size);

and finally

             FMUSIC_PlaySong(m_mod );
  • You must to post comments

Oops…forgot to put my name on the previous posting…

Am I loading the resource correctly, and ascertaining its size correctly?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.