I made a plugin for FMOD using SC68 lib to play .sc68 songs. It says in the docs that SC68 isn’t thread safe.
When I use the playsound example FMOD crashes when I try to play two sounds simultaneously, and I guess that’s the reason.
Is there any way to make this working? I don’t know how FMOD/Windows handle plugins/dll’s, but can you somehow make the sounds use independent instances of the plugin to avoid data corruption?
- bLAZER asked 8 years ago
Ok, so in other words the solution is "make the library thread-safe".
That’s far too complicated though, you really have to dig in deep into it and know how it works.
So what you’re saying is there is no way to use a library with FMOD that isn’t thread-safe.
No, he means to wrap your functions with EnterCriticalSection/LeaveCriticalSection assuring that any call that’s made to your code is running in only one thread at any given time. The result is that even though the library is not thread safe its code will never be running in parallel.
- Cirrus answered 8 years ago
Please login first to submit.