private void SwitcherDisconnected() { IsConnected = false; // Remove all input monitors, remove callbacks foreach (InputMonitor inputMon in m_inputMonitors) { inputMon.Input.RemoveCallback(inputMon); inputMon.LongNameChanged -= new SwitcherEventHandler(OnInputLongNameChanged); } m_inputMonitors.Clear(); if (m_mixEffectBlock1 != null) { // Remove callback m_mixEffectBlock1.RemoveCallback(m_mixEffectBlockMonitor); // Release reference m_mixEffectBlock1 = null; } if (m_switcher != null) { // Remove callback: m_switcher.RemoveCallback(m_switcherMonitor); // release reference: m_switcher = null; } }
public void Dispose() { lock (_lock) { if (_switcher != null) { _switcher.RemoveCallback(this); _switcher = null; } } }
private void SwitcherDisconnected() { if (m_switcher != null) { // Remove callback: m_switcher.RemoveCallback(this); // release reference: m_switcher = null; } nullifyMixEffectsBlocks(); DisconnectedEvent?.Invoke(this, new EventArgs()); }
public void Disconnect() { if (switcher == null) { return; } switcher.RemoveCallback(switcherMonitor); switcher = null; foreach (var item in inputs) { item.Dispose(); } inputs.Clear(); }
private void SwitcherDisconnected() { if (m_mixEffectBlock1 != null) { // Remove callback m_mixEffectBlock1.RemoveCallback(m_mixEffectBlockMonitor); // Release reference m_mixEffectBlock1 = null; } if (m_switcher != null) { // Remove callback: m_switcher.RemoveCallback(m_switcherMonitor); // release reference: m_switcher = null; } }