iPhone Alarm causes FMod to freeze

Hi,

When our game is running with streamed music and the iPhone alarm goes off, the game hangs inside FMOD::Studio::ParameterInstance::setValue (doesn’t return back from this function). The instance of that param is the streamed Music.

I get this warning in Debug mode when this happens:

[WRN] AsyncCommandBuffer::gameWriteFull : WARNING. Flushing async studio command buffer due to full size.

This is a 100% repro in our game, and it’s always hanging in the same function for the same instance, the streamed music, which is the only streamed event.

The FMod version is : 0x00010509

Any idea what we might be doing wrong?

Thanks,

Auday

Update:

When I run your examples (like the 3D example in Studio for iOS) and let the iPhone alarm go off, press OK (on the system alarm dialog), then when the control goes back to the example App, it goes all silent.
So it seems that there is something wrong going on there.

We are planning to ship our 3D racing game for GDC, and this is the last Audio bug we have. We appreciate any help here.

Thanks,

Auday

Digging more into the documentation, I found this:

FMOD_RESULT System::mixerSuspend();
FMOD_RESULT System::mixerResume();

Calling these functions from applicationWillResignActive and applicationDidBecomeActive respectively, solved the problem.