static void DestroySystem() { if (system != null) { UnityEngine.Debug.Log("FMOD Studio: Destroying editor system instance"); system.release(); system = null; } }
void OnDestroy() { if (studioSystem != null) { studioSystem.release(); studioSystem = null; } initException = null; instance = null; }
void OnDestroy() { if (studioSystem != null) { UnityEngine.Debug.Log("FMOD Studio: Destroying runtime system instance"); studioSystem.release(); studioSystem = null; } initException = null; instance = null; isQuitting = true; }
void CheckInitResult(FMOD.RESULT result, string cause) { if (result != FMOD.RESULT.OK) { if (studioSystem != null) { studioSystem.release(); studioSystem = null; } throw new SystemNotInitializedException(result, cause); } }
// A hook for custom initialization logic. RuntimeManager.Initialize calls this // just before calling system.Initialize. // Call reportResult() with the result of each FMOD call to use FMOD's error handling logic. public virtual void PreInitialize(FMOD.Studio.System system, Action <FMOD.RESULT, string> reportResult) { }
// A hook for platform-specific initialization logic. RuntimeManager.Initialize calls this // just before calling studioSystem.Initialize. public virtual void PreInitialize(FMOD.Studio.System studioSystem) { }
private System(FMOD.Studio.System system) { Ready = false; _system = system; //_eventsChanged = new Subject<string>(); }
public System(bool enableLiveUpdate = false, OUTPUTTYPE outputType = OUTPUTTYPE.AUTODETECT, int driverIndex = 0, int sampleRate = 48000, SPEAKERMODE speakerMode = SPEAKERMODE.DEFAULT, int numRawSpeakers = 0, uint bufferLength = 1024, int numBuffers = 4) { Ready = false; _system = Utilities.initStudioSystem(enableLiveUpdate, outputType, driverIndex, sampleRate, speakerMode, numRawSpeakers, bufferLength, numBuffers); }