/// Internal. Initialise the native object. private void init() { if (spat_ != null) { return; } if (AudioEngineManager.Instance == null || AudioEngineManager.Instance.nativeEngine == null) { return; } spat_ = AudioEngineManager.Instance.nativeEngine.createSpatDecoderFile(); if (spat_ == null) { Utils.logError("Native SpatDecoderFile is invalid", this); return; } #if ENABLE_MONO spat_.setEventListener(events); #endif updateProps(); }
/// Internal. Initialise the native object. private void init() { if (spat_ != null) { return; } if (AudioEngineManager.Instance == null || AudioEngineManager.Instance.nativeEngine == null) { return; } spat_ = AudioEngineManager.Instance.nativeEngine.createSpatDecoderFile(); if (spat_ == null) { Utils.logError("Native SpatDecoderFile is invalid", this); return; } thisHandle = GCHandle.Alloc(this); spat_.setEventCallback(eventCallback, GCHandle.ToIntPtr(thisHandle)); updateProps(); }