Hi! I write code with fmod in unity and build it for android platform.
This code
FMODUnity.RuntimeManager.CoreSystem.setOutput(FMOD.OUTPUTTYPE.WAVWRITER_NRT);
FMODUnity.RuntimeManager.CoreSystem.init(128, FMOD.INITFLAGS.STREAM_FROM_UPDATE, IntPtr.Zero);
works in editor in windows, but not works in android.
I check return code, and was surprized that both strings produce ERR_INITIALIZED error. This error told me that I can’t put this strings after init() of system. Ok. But I don’t call init() by myself. Probably, it’s mean that system in unity is initialiazed at start of scene or something like this.
It’s ok. But I need in one scene normal fmod behavior, then FMOD.OUTPUTTYPE.WAVWRITER_NRT behavior, then normal again.
So I need re-initialize system someway.
From user manual I understand that I can close() connection with fmod and then init() system again with my flags. OK! But when I put this code:
FMODUnity.RuntimeManager.CoreSystem.close();
FMODUnity.RuntimeManager.CoreSystem.setOutput(FMOD.OUTPUTTYPE.WAVWRITER_NRT);
FMODUnity.RuntimeManager.CoreSystem.init(128, FMOD.INITFLAGS.STREAM_FROM_UPDATE, IntPtr.Zero);
All strings return FMOD_OK. But after a few seconds applications crash and unity crash too!
I can’t understand what is going on. Please, help me to understand.
What is the right way to re-initialize fmod system in unity?
Thanks!