# iPhone Alarm causes FMod to freeze

**URL:** <https://qa.fmod.com/t/iphone-alarm-causes-fmod-to-freeze/11817>\
**Category:** FMOD Engine\
**Created:** [January 30, 2015, 10:43pm UTC](https://qa.fmod.com/t/iphone-alarm-causes-fmod-to-freeze/11817 "2015-01-30T22:43:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![auday](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@auday](https://qa.fmod.com/u/auday)\
**Post date:** [January 30, 2015, 10:43pm UTC](https://qa.fmod.com/t/iphone-alarm-causes-fmod-to-freeze/11817/1 "2015-01-30T22:43:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![auday](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@auday](https://qa.fmod.com/u/auday)\
**Post date:** [February 9, 2015, 2:08am UTC](https://qa.fmod.com/t/iphone-alarm-causes-fmod-to-freeze/11817/2 "2015-02-09T02:08:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![auday](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@auday](https://qa.fmod.com/u/auday)\
**Post date:** [February 9, 2015, 4:59pm UTC](https://qa.fmod.com/t/iphone-alarm-causes-fmod-to-freeze/11817/3 "2015-02-09T16:59:10Z")

</div>

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.
