I’m trying to play an MP3 file already loaded in memory. If the sound (pResIntro) I wish to open is a wave file, and if I remove the 2 comments in the code below, the sounds plays after calling FMOD_System_PlaySound(). But if the sound is an MP3 file and my application tries to call FMOD_System_CreateSound(), it shows a message box with the following error, then terminates:
[code:2x7s1y81]Exception EAccessViolation in module msvcrt.dll at 0000A513.
Access violation at address 7698A513 in module ‘msvcrt.dll’. Read of address 0042A000.[/code:2x7s1y81]

After successful calls to FMOD_System_Create() and FMOD_System_Init(), I use the following code to open the sound in memory:

[code:2x7s1y81] ZeroMemory(@pFMod_ExInfo, SizeOf(FMOD_CREATESOUNDEXINFO));
pFMod_ExInfo.cbsize := SizeOf(FMOD_CREATESOUNDEXINFO);
pFMod_ExInfo.length := SizeofResource(0, hResIntro); // size of the sound’s data (it’s loaded from resource)
pFMod_ExInfo.format := FMOD_SOUND_FORMAT_MPEG;
pFMod_ExInfo.suggestedsoundtype := FMOD_SOUND_TYPE_MPEG;
// for WAV
//pFMod_ExInfo.format := FMOD_SOUND_FORMAT_PCM16;
//pFMod_ExInfo.suggestedsoundtype := FMOD_SOUND_TYPE_WAV;
FMOD_System_CreateSound(pFMod_System, pResIntro, FMOD_SOFTWARE or FMOD_CREATECOMPRESSEDSAMPLE or FMOD_OPENMEMORY, @pFMod_ExInfo, pFModSound_Intro);[/code:2x7s1y81]

I’m using FMOD Ex v4.06.22 (32 bit) on Windows Vista (64 bit).

Any ideas?

  • You must to post comments

No ideas, anyone? 😥
Please tell me if you need to know more, or anything..

Edit2: Maybe it’s the same problem as in my other thread. But I can’t get the 64 bit version of the DLL to work (using the .pas files from the 32 bit package because I didn’t find them in in the 64 bit package). I just get an error saying:
[code:27h16i7t]This application has failed to start because fmodex.dll was not found. Re-installing the application may fix this problem.[/code:27h16i7t]
And if you’re wondering: yes I renamed fmodex64.dll to fmodex.dll.

Dunno :(

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.