I’ve posted this in reply in another thread but it was maybe overlooked and I guess it would be better having a thead of its own.

It turns out after experimenting for a month with the crash whenever I call system->release() that the root of the issue is this: when FMOD is used (init/loop/release) from a DLL code, which DLL is used by an application .exe, then, it exhibit this crashing issue. Furthermore, even if I don’t call system->release() nor system->update() in a loop, whenever the application quits and calls the DLL "quit", I get an "unreferenced memory access error". I’ve tried both with static multithread C++ libs and DLL multithreaded C++.

Now this begs the question to you: What is the correct way to use the fmod sound system from a DLL, that is itself used by a .exe, or by another DLL?

Do you have a typical code fragement of how and where to place the init, the loop, and the release code blocks? Is there any particular "windows" thread/process API to call/take care of?

All the examples are .exe and not DLL using the FMOD DLL. This is critical it is used from a DLL.

Thanks in advance.


  • You must to post comments

Got a working project, where a vb6 exe uses a purebasic dll to access fmod.dll, and it works fine…
Just got sometimes division by zero errors when using the vb timer function, which seems somehow strange, but I already had this problem when using fmod.dll directly from the vb6 exe.
(http://www.ctuser.net/products/qplayer/ … 56_dev.zip should contain the pb source; 500kb):


You should also do some stuff between init and close, or fmodex may hang… Sleep_(1) for example;

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.