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

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

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

revision 2380 by schoenebeck, Wed Nov 21 21:52:15 2012 UTC revision 2431 by schoenebeck, Mon Mar 4 15:12:48 2013 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2012 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2013 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 338  namespace LinuxSampler { Line 338  namespace LinuxSampler {
338               * Helper function for MIDI input devices that have the               * Helper function for MIDI input devices that have the
339               * MIDI data as raw bytes.               * MIDI data as raw bytes.
340               *               *
341               * @param pData       - pointer to the raw MIDI data               * @param pData - pointer to the raw MIDI data
342               */               */
343              void DispatchRaw(uint8_t* pData);              void DispatchRaw(uint8_t* pData);
344    
# Line 367  namespace LinuxSampler { Line 367  namespace LinuxSampler {
367              SynchronizedConfig<std::vector<uint8_t> > noteOnVelocityFilter;              SynchronizedConfig<std::vector<uint8_t> > noteOnVelocityFilter;
368              SynchronizedConfig<std::vector<uint8_t> >::Reader noteOnVelocityFilterReader;              SynchronizedConfig<std::vector<uint8_t> >::Reader noteOnVelocityFilterReader;
369              Mutex noteOnVelocityFilterMutex;              Mutex noteOnVelocityFilterMutex;
370                uint8_t runningStatusBuf[3];
371    
372              /**              /**
373               * Constructor               * Constructor
# Line 377  namespace LinuxSampler { Line 378  namespace LinuxSampler {
378               * Destructor               * Destructor
379               */               */
380              virtual ~MidiInputPort();              virtual ~MidiInputPort();
381                
382                /**
383                 * Takes a MIDI status byte (the first byte of each MIDI event) as
384                 * argument and returns the expected size of the associated MIDI
385                 * event according to the MIDI protocol. Returns -1 on invalid
386                 * status bytes AND on variable size events (SysEx events).
387                 *
388                 * This method can be used for drivers which have to deal with raw
389                 * MIDI data, like the CoreMIDI driver, which can receive MIDI
390                 * packets with more than one event per packet.
391                 *
392                 * This method handles "MIDI running status" as well. That is, in
393                 * case the supplied byte is not a status byte but a data byte,
394                 * it expects the event to be in "running status" and accordingly
395                 * uses the status byte of the previous event (processed by the
396                 * Dispatch*() methods).
397                 */
398                int expectedEventSize(unsigned char byte);
399    
400              friend class MidiInputDevice;              friend class MidiInputDevice;
401    
402          private:          private:            
403              static SynchronizedConfig<std::set<Engine*> > SysexListeners; ///< All engines that are listening to sysex messages.              static SynchronizedConfig<std::set<Engine*> > SysexListeners; ///< All engines that are listening to sysex messages.
404                
405                uint8_t* handleRunningStatus(uint8_t* pData);
406      };      };
407    
408  } // namsepace LinuxSampler  } // namsepace LinuxSampler

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

  ViewVC Help
Powered by ViewVC