/[svn]/linuxsampler/trunk/src/drivers/midi/MidiInputPort.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/midi/MidiInputPort.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2430 by persson, Sat Mar 2 07:03:04 2013 UTC revision 2431 by schoenebeck, Mon Mar 4 15:12:48 2013 UTC
# Line 614  namespace LinuxSampler { Line 614  namespace LinuxSampler {
614          }          }
615      }      }
616    
617        int MidiInputPort::expectedEventSize(unsigned char byte) {
618            if (!(byte & 0x80) && runningStatusBuf[0])
619                byte = runningStatusBuf[0]; // "running status" mode
620            
621            if (byte < 0x80) return -1; // not a valid status byte
622            if (byte < 0xC0) return 3; // note on/off, note pressure, control change
623            if (byte < 0xE0) return 2; // program change, channel pressure
624            if (byte < 0xF0) return 3; // pitch wheel
625            if (byte == 0xF0) return -1; // sysex message (variable size)
626            if (byte == 0xF1) return 2; // time code per quarter frame
627            if (byte == 0xF2) return 3; // sys. common song position pointer
628            if (byte == 0xF3) return 2; // sys. common song select
629            if (byte == 0xF4) return -1; // sys. common undefined / reserved
630            if (byte == 0xF5) return -1; // sys. common undefined / reserved
631            return 1; // tune request, end of SysEx, system real-time events
632        }
633    
634  } // namespace LinuxSampler  } // namespace LinuxSampler

Legend:
Removed from v.2430  
changed lines
  Added in v.2431

  ViewVC Help
Powered by ViewVC