i updated to latest fmod sdk for iOS6 (fmod 4.42.05 stable)
We stop a sound event before it ends naturally with this function:
FMOD_EVENT * event,
With immediate set to false. The fadeout should be 50ms (by default). It worked before, but now it does not stop the sound, the sound is played until its end.
Am I the only one with this bug? For now I just set immediate to true, but I wonder why did it work before, and not now…
[edit: this behavior appears on the iPhone 5, also the function returns FMOD_OK in any case]
- dav asked 6 years ago
i tried with 4.43.05 and it’s still buggy, more generally it seems some sound events are not stopped in rare case hard to reproduce if I use event_category->stopAllEvents() (I guess it’s because it respects the fade out, where is the bug).
Also when your app goes in background with iOS6, you can hear very weird stuff when it comes back in foreground, like an old vinyl disc looping during a second or two.
I am pretty sure FMOD has some bug with iOS6 but maybe it comes from my code (I hope Matthew or someone else at Firelight could enlighten me). Anyway, my fix is to use only the event::stop(true) method with immediate set to true (it’s false by default). For event_category->stopAllEvents(), there is no such parameter, I have to parse all sound event instances recursively in a category and stop them manually with stop(true).
I have been investigating the looping audio issue when FMOD comes into the foreground today and have tracked down the issue. It is isolated to audio decoded with AudioQueue, so MP3, AAC and ALAC however I don’t have a solution as yet. It appears one of the iOS SDK APIs is taking over 1 seconds to complete, only on iOS 6.0. I have reported the issue to Apple, hopefully we can get a fix or workaround in the near future.
Regarding the event stop issue, could you send a demonstration of the problem to email@example.com please, I doubt the issue is iOS specific as the event system is almost completely cross platform.
thanks. for the stop, it’s because I call EventCategory::setPaused(false) on the master category. After that all calls to Event::stop(false) do this:
FMOD: EventI::stopInternal : 0x2040e408 0
but not this
FMOD: EventI::stopInternal : 0x2040e408 1
I sent you an example by email. I don’t know if I’m doing something wrong or if it’s a bug. waiting for your instructions
Please login first to submit.