public void Close() { lock (this) { if (_handle == IntPtr.Zero) { return; } MixerNativeMethods.mixerClose(_handle); _handle = IntPtr.Zero; } }
public void Close() { try { lock (this) { using (MixerLock(lockInfinite)) { if (_handle == IntPtr.Zero) { return; } MixerNativeMethods.mixerClose(_handle); _handle = IntPtr.Zero; } } } catch (Exception ex) { Log.Error($"Mixer: error occured in Close(): {ex}"); } }