コード例 #1
0
ファイル: SwitcherControl.cs プロジェクト: Gustice/SimpleCut
        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;
            }
        }
コード例 #2
0
 public void Dispose()
 {
     lock (_lock)
     {
         if (_switcher != null)
         {
             _switcher.RemoveCallback(this);
             _switcher = null;
         }
     }
 }
コード例 #3
0
        private void SwitcherDisconnected()
        {
            if (m_switcher != null)
            {
                // Remove callback:
                m_switcher.RemoveCallback(this);

                // release reference:
                m_switcher = null;
            }

            nullifyMixEffectsBlocks();
            DisconnectedEvent?.Invoke(this, new EventArgs());
        }
コード例 #4
0
 public void Disconnect()
 {
     if (switcher == null)
     {
         return;
     }
     switcher.RemoveCallback(switcherMonitor);
     switcher = null;
     foreach (var item in inputs)
     {
         item.Dispose();
     }
     inputs.Clear();
 }
コード例 #5
0
        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;
            }
        }