/[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 550 by schoenebeck, Fri Mar 18 18:16:27 2005 UTC revision 551 by schoenebeck, Tue May 17 18:16:54 2005 UTC
# Line 171  namespace LinuxSampler { Line 171  namespace LinuxSampler {
171  // *************** MidiInputDeviceAlsa ***************  // *************** MidiInputDeviceAlsa ***************
172  // *  // *
173    
174      MidiInputDeviceAlsa::MidiInputDeviceAlsa(std::map<String,DeviceCreationParameter*> Parameters) : MidiInputDevice(Parameters), Thread(true, true, 1, -1) {      MidiInputDeviceAlsa::MidiInputDeviceAlsa(std::map<String,DeviceCreationParameter*> Parameters, void* pSampler) : MidiInputDevice(Parameters, pSampler), Thread(true, true, 1, -1) {
175          if (snd_seq_open(&hAlsaSeq, "default", SND_SEQ_OPEN_INPUT, 0) < 0) {          if (snd_seq_open(&hAlsaSeq, "default", SND_SEQ_OPEN_INPUT, 0) < 0) {
176              throw MidiInputException("Error opening ALSA sequencer");              throw MidiInputException("Error opening ALSA sequencer");
177          }          }
# Line 212  namespace LinuxSampler { Line 212  namespace LinuxSampler {
212      }      }
213    
214      String MidiInputDeviceAlsa::Version() {      String MidiInputDeviceAlsa::Version() {
215              String s = "$Revision: 1.14 $";              String s = "$Revision: 1.15 $";
216              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
217      }      }
218    
# Line 237  namespace LinuxSampler { Line 237  namespace LinuxSampler {
237                              break;                              break;
238    
239                          case SND_SEQ_EVENT_PITCHBEND:                          case SND_SEQ_EVENT_PITCHBEND:
                           //  fprintf(stderr, "Pitchbender event on Channel %2d: %5d   \n",  
                           //          ev->data.control.channel, ev->data.control.value);  
240                              pMidiInputPort->DispatchPitchbend(ev->data.control.value, ev->data.control.channel);                              pMidiInputPort->DispatchPitchbend(ev->data.control.value, ev->data.control.channel);
241                              break;                              break;
242    
# Line 258  namespace LinuxSampler { Line 256  namespace LinuxSampler {
256                          case SND_SEQ_EVENT_SYSEX:                          case SND_SEQ_EVENT_SYSEX:
257                              pMidiInputPort->DispatchSysex(ev->data.ext.ptr, ev->data.ext.len);                              pMidiInputPort->DispatchSysex(ev->data.ext.ptr, ev->data.ext.len);
258                              break;                              break;
259    
260                            case SND_SEQ_EVENT_PGMCHANGE:
261                                pMidiInputPort->DispatchProgramChange(ev->data.control.value, ev->data.control.channel);
262                                break;
263                      }                      }
264                      snd_seq_free_event(ev);                      snd_seq_free_event(ev);
265                  } while (snd_seq_event_input_pending(hAlsaSeq, 0) > 0);                  } while (snd_seq_event_input_pending(hAlsaSeq, 0) > 0);

Legend:
Removed from v.550  
changed lines
  Added in v.551

  ViewVC Help
Powered by ViewVC