I am using the FMOD event and music APIs to add a soundtrack to an open source pinball game, as a demo. It works perfectly … the first time. But when I pause the game, and then start it up again, it crashes/hangs when the bass line comes in (which is cued by a callback when the first segment of the androidTrack finishes playing).
This only seems to happen when the musicSystem is active. I am starting and stopping the audio system for each onStart and onStop, using the simple_event example code as guide. My guess is that something is horked with the AudioTrackThread memory release, preventing a clean restart, but that’s just a guess. Can you take a look at my code, and tell me if I’ve screwed up somehow? Thanks!
developed using FMOD Designer 4.34.03 Mac, and FMOD API 4.35.03 Android
testing on Nexus S (Gingerbread v2.3.4) and Xoom tablet (Honeycomb v3.1)
Eclipse project and FMOD audio/event/bank files here:
- pdx asked 6 years ago
Thanks a lot for the bug report, and the test application, it was very helpful.
I managed to reproduce it and track down the bug, was basically due to some globals not being reset when FMOD was re-initialized. The fix will be in our next release, 4.35.06, which should be out in about a fortnight.
ya know what i like? one line workarounds to stop ship bugs!
"exit(0)" at the very end solves the problem. it kills the process, and allows a clean start every time, which in this case is what i want.
however, i’m guessing there’s still an issue with the musicSystem release (mostly because when i commented out the musicSystem calls, it stopped crashing). feel free to use the linked zip as a test case.
Please login first to submit.