# System.createDSP(...) fails on iOS

**URL:** <https://qa.fmod.com/t/system-createdsp-fails-on-ios/11936>\
**Category:** Unity\
**Created:** [May 27, 2015, 9:22pm UTC](https://qa.fmod.com/t/system-createdsp-fails-on-ios/11936 "2015-05-27T21:22:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drapple1](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@drapple1](https://qa.fmod.com/u/drapple1)\
**Post date:** [May 27, 2015, 9:22pm UTC](https://qa.fmod.com/t/system-createdsp-fails-on-ios/11936/1 "2015-05-27T21:22:47Z")

</div>

So I’m trying to get the final, rendered audio out of FMOD 1.06.03 in Unity 5.0.2f1. I’m using what I believe is the proper way to get it - creating a DSP with a read callback. This seems to work fine in Unity’s playmode. However, running on an iOS device and I get this error:

`
ExecutionEngineException: Attempting to JIT compile method '(wrapper managed-to-native) FMOD.System:FMOD5_System_CreateDSP (intptr,FMOD.DSP_DESCRIPTION&,intptr&)' while running with --aot-only.
`

Why would this happen for createDSP? I’m also using createDSPByType, which works fine on the device. Is there something magical I need to do with the callbacks? Even when I leave the DSP\_DESCRIPTION blank, I get this issue.

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [May 28, 2015, 7:41am UTC](https://qa.fmod.com/t/system-createdsp-fails-on-ios/11936/2 "2015-05-28T07:41:59Z")

</div>

There is a section on this towards the bottom of this page [http://docs.unity3d.com/460/Documentation/Manual/TroubleShootingIPhone.html](http://docs.unity3d.com/460/Documentation/Manual/TroubleShootingIPhone.html)

---

<div class="post-metadata">

**Author:** ![drapple1](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@drapple1](https://qa.fmod.com/u/drapple1)\
**Post date:** [May 28, 2015, 5:17pm UTC](https://qa.fmod.com/t/system-createdsp-fails-on-ios/11936/3 "2015-05-28T17:17:47Z")

</div>

> [@](#):
>
> There is a section on this towards the bottom of this page [Unity - Manual: Troubleshooting on iOS devices](http://docs.unity3d.com/460/Documentation/Manual/TroubleShootingIPhone.html)

I tried adding “[MonoPInvokeCallback(typeof(FMOD.DSP\_READCALLBACK))]” to my callback, but it doesn’t help.

The problem is, even if I do this, with a completely blank DSP\_DESCRIPTION, it fails:

* * *
`
    FMOD.DSP dsp;
    FMOD.DSP_DESCRIPTION desc = new FMOD.DSP_DESCRIPTION();
    FMOD.RESULT result = system.createDSP( ref desc, out dsp );
`
* * *
So, it doesn't look like my callback is the problem, but rather the actual call to createDSP which is failing.
