internal void OnWaveBankDestroyed() { IsDisposed = true; if (buffer != null) { pin.Free(); buffer = null; } else if (ioStream != IntPtr.Zero) { FAudio.FAudio_close(ioStream); ioStream = IntPtr.Zero; } handle = IntPtr.Zero; selfReference = null; }
internal void OnWaveBankDestroyed() { IsDisposed = true; if (bankData != IntPtr.Zero) { if (bankDataLen != IntPtr.Zero) { FNAPlatform.FreeFilePointer(bankData); bankDataLen = IntPtr.Zero; } else { FAudio.FAudio_close(bankData); } bankData = IntPtr.Zero; } handle = IntPtr.Zero; selfReference = null; }