# FMOD music will not resume after Ironsource Ads

**URL:** <https://qa.fmod.com/t/fmod-music-will-not-resume-after-ironsource-ads/20209>\
**Category:** Unity\
**Tags:** ios, unity\
**Created:** [May 10, 2023, 10:01am UTC](https://qa.fmod.com/t/fmod-music-will-not-resume-after-ironsource-ads/20209 "2023-05-10T10:01:59Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [June 2, 2023, 4:54am UTC](https://qa.fmod.com/t/fmod-music-will-not-resume-after-ironsource-ads/20209/13 "2023-06-02T04:54:11Z")

</div>

So I’ve done a little more investigation into the issue - it seems that my statement that:

> [@Leah\_FMOD](#):
>
> the iOS notifications that FMOD uses to pause and resume are never fired, and Ironsource appears to simply grab audio session focus and not return it.

is incorrect. What actually happens is when Ironsource plays an ad (i.e. a rewarded video) the FMOD system continues to run in the background and attempt to output audio. In theory, both FMOD and Ironsource will both output audio simultaneously, no problem.

However, the issue is that Ironsource does something to the AudioSession that changes the length of its audio buffer. For example, by default FMOD’s buffer is ~16KB (512 byte buffer \* 4 buffer blocks \* 32 bit float) long, but on playing a rewarded video, the buffer the AudioSession requests changes length (e.g. to 23040 bytes). This immediately triggers an error, as the FMOD system’s buffer length is insufficient, and causes FMOD not to output audio. Ironsource doesn’t appear to reset the buffer length either, meaning that FMOD continues to receive the error and not output audio, even after the ad is finished.

If Ironsource _did_ reset the AudioSession’s buffer length to what it was before the rewarded video, then suspending FMOD before starting an ad and the resuming in the relevant callback or in `OnApplicationPause(false)` should work.

As a workaround, increasing FMOD’s buffer length to be larger than what Ironsource uses will ensure that audio is outputted correctly. You can do this in Unity at FMOD → Edit Settings → Platform Specific → DSP buffer length - doubling it to 1024 (effectively 32KB) worked for me. However, I have noticed that the buffer length Ironsource uses can vary, so there may be situations where the buffer length it uses exceeds FMOD even at 1024.

---

_[View the full topic](https://qa.fmod.com/t/fmod-music-will-not-resume-after-ironsource-ads/20209)._
