Hi,
I’m still trying to play my first song using FMOD low level API, in a Unity behaviour.
Here is my code:
FMOD.System system = new FMOD.System();
var o = system.init(1, FMOD.INITFLAGS.NORMAL, new System.IntPtr(0));
Init() returns ERR_INVALID_PARAM.
Any idea of what I could have done wrong here? :\
Thanks,
Sylvain.
Note: it’s a blank Unity project, where I did import fmodstudio11014_v2.unitypackage, and then attached the behaviour (code as above) to the camera…
You need to use FMOD.Factory.System_Create to first create a Core System before initializing it.
You can find more about this in the FMOD Core API Initialization section of the docs.
Thanks for your answer…
Isn’t the “new FMOD.System()” I did the C# equivalent of FMOD.Factory.System_Create in C++?
FMOD.System
is a struct that just contains a handle and functions, this can be found in the fmod.cs wrapper, whereas FMOD.Factory.System_Create
calls into FMOD to actually create a system.