Beispiel #1
0
        protected void Dispose(bool disposing)
        {
            lock (engine.gcSync)
            {
                if (!IsDisposed)
                {
                    if (Disposing != null)
                    {
                        Disposing.Invoke(this, null);
                    }

                    // If this is disposed, stop leaking memory!
                    if (!engine.IsDisposed)
                    {
                        engine.UnregisterSoundBank(handle);
                        FAudio.FACTSoundBank_Destroy(handle);
                        Marshal.FreeHGlobal(dspSettings.pMatrixCoefficients);
                    }
                    OnSoundBankDestroyed();
                }
            }
        }