I play a lot of short, textured sounds in various positions in 3D space. Sometimes my game crashes. 99% of the crashes come on the system->release() call when cleaning up, the other 1% come on a channel->set3DAttributes() or channel->setVolume() call.
As a test I created 1 sound per frame, up to about 4-500 simultaneous sounds, (not a realistic case, but I’m trying to find out what the problem is). Before freeing the system, I cycle through all my active sound channels, and release them, then I updated the system, then ran:
If channels == 0, the system->release() call never crashes, if channels is anything else, it crashes 100% of the time. If I never use 3D sounds and only use 2D sounds, channels will be 0 100% of the time, so this is most definitely a 3D sound issue.
My sound card driver info from FMOD is: "Realtek HD Audio output" – my computer is a Macbook Pro… like 2-3 years old running Windows XP.
My FMOD system->init line looks like this: system->init(2048, FMOD_INIT_3D_RIGHTHANDED, 0)
And my create 2D/3D sample flags are as follows:
FMOD_SOFTWARE | FMOD_CREATESAMPLE | FMOD_ACCURATETIME | FMOD_LOOP_NORMAL | FMOD_OPENMEMORY; //2D
FMOD_3D | FMOD_ACCURATETIME | FMOD_CREATESAMPLE | FMOD_LOOP_NORMAL | FMOD_OPENMEMORY; //3D
The system->createSound() lines are identical for 2D and 3D, with the exception of the FMOD_3D and FMOD_SOFTWARE.
Any help is very much appreciated,
- oZZ asked 9 years ago
[quote="Adiss":2ziliym8]Try adding FMOD_SOFTWARE to the 3D sounds as well. Buggy drivers are quite often the cause of crashes with hardware sounds, so using software sounds will fix that right up.
Hope that helps![/quote:2ziliym8]
Ah ha! I, (incorrectly), assumed that FMOD_SOFTWARE and FMOD_3D were incompatible. I think it might be fixed now, unsure if the error will creep up somewhere again, but it seems good for now. Thank you very much!
- oZZ answered 9 years ago
Please login first to submit.