System.createDSP(...) fails on iOS

(Douglas Applewhite) #1

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.

(Nicholas Wilcox) #2

There is a section on this towards the bottom of this page

(Douglas Applewhite) #3

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.