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

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

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

revision 226 by schoenebeck, Wed Aug 25 22:00:33 2004 UTC revision 392 by schoenebeck, Sat Feb 19 02:40:24 2005 UTC
# Line 27  Line 27 
27    
28  namespace LinuxSampler {  namespace LinuxSampler {
29    
     REGISTER_MIDI_INPUT_DRIVER(MidiInputDeviceAlsa);  
   
     /* Common parameters */  
     REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceAlsa, ParameterActive);  
     REGISTER_MIDI_INPUT_DRIVER_PARAMETER(MidiInputDeviceAlsa, ParameterPorts);  
   
   
   
30  // *************** ParameterName ***************  // *************** ParameterName ***************
31  // *  // *
32    
# Line 152  namespace LinuxSampler { Line 144  namespace LinuxSampler {
144  // *************** MidiInputDeviceAlsa ***************  // *************** MidiInputDeviceAlsa ***************
145  // *  // *
146    
147      MidiInputDeviceAlsa::MidiInputDeviceAlsa(std::map<String,DeviceCreationParameter*> Parameters) : MidiInputDevice(Parameters), Thread(true, 1, -1) {      MidiInputDeviceAlsa::MidiInputDeviceAlsa(std::map<String,DeviceCreationParameter*> Parameters) : MidiInputDevice(Parameters), Thread(true, true, 1, -1) {
148          if (snd_seq_open(&hAlsaSeq, "default", SND_SEQ_OPEN_INPUT, 0) < 0) {          if (snd_seq_open(&hAlsaSeq, "default", SND_SEQ_OPEN_INPUT, 0) < 0) {
149              throw MidiInputException("Error opening ALSA sequencer");              throw MidiInputException("Error opening ALSA sequencer");
150          }          }
# Line 193  namespace LinuxSampler { Line 185  namespace LinuxSampler {
185      }      }
186    
187      String MidiInputDeviceAlsa::Version() {      String MidiInputDeviceAlsa::Version() {
188              String s = "$Revision: 1.10 $";              String s = "$Revision: 1.13 $";
189              return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword              return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
190      }      }
191    
# Line 235  namespace LinuxSampler { Line 227  namespace LinuxSampler {
227                          case SND_SEQ_EVENT_NOTEOFF:                          case SND_SEQ_EVENT_NOTEOFF:
228                              pMidiInputPort->DispatchNoteOff(ev->data.note.note, ev->data.note.velocity, ev->data.control.channel);                              pMidiInputPort->DispatchNoteOff(ev->data.note.note, ev->data.note.velocity, ev->data.control.channel);
229                              break;                              break;
230    
231                            case SND_SEQ_EVENT_SYSEX:
232                                pMidiInputPort->DispatchSysex(ev->data.ext.ptr, ev->data.ext.len);
233                                break;
234                      }                      }
235                      snd_seq_free_event(ev);                      snd_seq_free_event(ev);
236                  } while (snd_seq_event_input_pending(hAlsaSeq, 0) > 0);                  } while (snd_seq_event_input_pending(hAlsaSeq, 0) > 0);

Legend:
Removed from v.226  
changed lines
  Added in v.392

  ViewVC Help
Powered by ViewVC