예제 #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)
                    {
                        FAudio.FACTSoundBank_Destroy(handle);
                    }
                    OnSoundBankDestroyed();
                }
            }
        }
예제 #2
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();
                }
            }
        }