Applogies if this has already been asked before or covered within the documentation. I did search a quick search for it before posting and did briefly glance over the documenation but couln’t find any mention of what i’am going to ask.
Is FMOD EX thread safe, that is to say if it intialized from one thread, can samples and sounds be played from another thread? In my application we have a global sound object which is created, intialized and keeps track of sounds loaded, as well as what channels they are played on and so on. According to my partner in crime FMOD is crashing when one thread tells it to play a sound that another thread loaded.
I found a useful page under Tutorials in the api manual – the bottom line is:
[quote:12csbudn]Do not call FMOD commands from different threads! This will lead to instability, corruption and possible crashes.
Some people are tempted to put System::update into a separate thread, do not do this.
To make FMOD thread safe would involve wrapping every FMOD function in a critical section, which adds unnecessary overhead, so at this time FMOD Ex is remaining ‘not thread safe’ for the time being. [/quote:12csbudn]
- alex_mm answered 12 years ago
Please login first to submit.