0
0

I’ve been getting some lockups on various platforms and I’m pretty sure it is because of my FMOD file callbacks and creating streams with the non-blocking flag.

I have a single mutex that I lock when each FMOD file callback is called so only one FMOD thread can be accessing the disc at a time. Then I open/read/close with our low level file io functions. Those low level functions are used to read our game data so inside them I call File_SetDiskBusy(true) when they enter and File_SetDiskBusy(false) when they return, that way FMOD doesn’t try to read when the game is loading data. That means I am calling File_SetDiskBusy from within my FMOD file callbacks. Could this be a problem?

thanks

  • You must to post comments
0
0

Yes it would be a problem, you’re not supposed to call it for fmod’s file access, you’re supposed to put setdiskbusy around YOUR file accesses (ie the game’s).

You’re effectively entering the criticalsection when it has already entered the criticalsection.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.