Our ipad application plays a bunch of OpenAL sources in parallel, one for each ongoing touch. The sources are created and started on touchesMoved, and stopped on touchesEnded or touchesCancelled.
Things seem to work fine, except for a bug where sometimes one source seems to continue playing after the touch ends. This seems to happen only when generating a lot of touch events.
I have verified that when this happens, all my AL sources have been stopped with alSourceStop and have been destroyed with alDeleteSources. OpenAL is not reporting any error. Yet the sound doesn't stop.
I'm starting to think this might be a bug in the iOS implementation of OpenAL. Has anyone seen something like that?
I'm having the same OpenAL issue myself with the new reverb features enabled on an iPad 2 and iOS 5. I can absolute confirm that Play/Stop commands for the same sound are paired up, and the issue occurs even if you don't reuse sources. Delaying stop doesn't help, nor does monitoring for state transition on a spawned thread with GCD. No idea how to proceed, but thought I'd pass along my observations while debugging this issue.
you may find the following solution helpful. I have been experiencing the same problem with my App, and so far, the best solution I have found is to simply create an "silence" openal source (a source with a buffer of silence, that is - full of zeroes), and play it always after I stop a sound.
This seems to fix the problem of sounds that continues playing even after a stop command, though it does introduce a small 'click' occasionally. In any case, I found a small 'click' more tolerable than having the sound continue when it's supposed to be stopped...
Hope this helps somebody out there!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With