I have a project that I’m building for both win32 and iPhone. I just updated to FMOD version 4.34.05 (stable) and now on iPhone my sound effects that should loop dont. This still works ok (i.e. they loop) on the win32 build. Also, both platforms worked properly on the last FMOD version I had, version 4.24.03.
The code I call to do this looks like this:
mpSystem->playSound(FMOD_CHANNEL_FREE, pSound, false, &pChannel);
In this cases, loopCount = -1.
Has anyone seen this problem? Any ideas what I can do to fix it other than trying to revert to an older version?
- OROD asked 5 years ago
Thanks for the reply. No, I dont pass that in. For music I do pass that in (since the music is always looped), but for sound effects I create them with only FMOD_LOWMEM and FMOD_3D. Is that flag required if the sound is to loop? I didnt think so since there’s the setLoopCount() function which allows you to specify whether a sound loops or not.
Ok I tried adding that flag and now the sound loops on the iPhone. So, I’m not sure which is the correct behavior, the win32 or the iPhone. Either way it seems there’s a bug in one of the two. Also seems the interface is confusing. Calling setLoopCount() should take precedence, unless there’s some technical reason I’m not aware of. If so, then the docs for setLoopCount() should state that in order to loop you previously need to have created the sound with the flag.
Either way I’m very grateful for the fix (or, workaround). Thank you!
Please login first to submit.