0
0

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);
pChannel->set3DAttributes(&soundPos, pSoundVel);
pChannel->set3DMinMaxDistance(minDist, maxDist);
pChannel->setVolume(volumeScale);
pChannel->setLoopCount(loopCount);

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?

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

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!

  • You must to post comments
0
0

You are right that it should take precendence or be better documented. I’ll make a note of it.

  • You must to post comments
0
0

It is strange that it is inconsitent. Are you passing the FMOD_LOOP_NORMAL flag to createSound?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.