Disconnect() public method

public Disconnect ( ) : void
return void
Esempio n. 1
0
        public TownsMidiOutputChannel AllocateOutputChannel(int pri)
        {
            TownsMidiOutputChannel res = null;

            for (int i = 0; i < 6; i++)
            {
                if (++_allocCurPos == 6)
                {
                    _allocCurPos = 0;
                }

                var s = _out[_allocCurPos].CheckPriority(pri);
                if (s == (int)CheckPriorityStatus.Disconnected)
                {
                    return(_out[_allocCurPos]);
                }

                if (s != (int)CheckPriorityStatus.HighPriority)
                {
                    pri = (int)s;
                    res = _out[_allocCurPos];
                }
            }

            if (res != null)
            {
                res.Disconnect();
            }

            return(res);
        }
Esempio n. 2
0
 void ReleasePedal()
 {
     for (TownsMidiOutputChannel oc = _out; oc != null; oc = oc._next)
     {
         if (oc._sustainNoteOff != 0)
         {
             oc.Disconnect();
         }
     }
 }
Esempio n. 3
0
        public override void NoteOff(byte note)
        {
            if (_out == null)
            {
                return;
            }

            for (TownsMidiOutputChannel oc = _out; oc != null; oc = oc._next)
            {
                if (oc._note != note)
                {
                    continue;
                }

                if (_sustain != 0)
                {
                    oc._sustainNoteOff = 1;
                }
                else
                {
                    oc.Disconnect();
                }
            }
        }