0
0

Hi,

I’m a new FMOD user and am using the code below to load a resource MOD file in my game. For some reason, the mod file audio plays well on my pc but when I compile for an ARM version and copy it to my device, the audio does not play?

HRSRC rec;
HGLOBAL handle;
void *data;
int length;

rec = FindResource(g_hInstance, MAKEINTRESOURCE(IDM_BGMUSIC), _T(“MOD”));
handle = LoadResource(g_hInstance, rec);
data = LockResource(handle);
length = SizeofResource(g_hInstance, rec);

tm_music = FMUSIC_LoadSongMemory(data, length);

if(!tm_music){
FMUSIC_FreeSong(tm_music);
fb_MusicPlaying = FALSE;
Shutdown();
}
FMUSIC_PlaySong(tm_music);
fb_MusicPlaying = TRUE;

I placed the IF statement to check if tm_music didn’t load properly and quit my game but the game still runs without the audio playing. Any ideas how to go about this?

  • You must to post comments
0
0

Hi Brett. Thanks for the quick answer!

Ok, I tried the same music but this time in XM format instead of MOD and it worked in my device! Did you mean it didn’t load the mod data properly? Weird.

But anyhow, FMOD rocks!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.