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

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

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

revision 1889 by persson, Sun Apr 26 12:19:00 2009 UTC revision 2426 by schoenebeck, Fri Mar 1 23:00:17 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 - 2009 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2012 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 29  Line 29 
29    
30  namespace LinuxSampler {  namespace LinuxSampler {
31    
32  void CALLBACK MidiInputDeviceMme::MidiInputPortMme::win32_midiin_callback(HMIDIIN handle, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2) {  void CALLBACK MidiInputDeviceMme::MidiInputPortMme::win32_midiin_callback(HMIDIIN handle, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2) {
33      MidiInputDeviceMme::MidiInputPortMme* p = (MidiInputDeviceMme::MidiInputPortMme*)dwInstance;      MidiInputDeviceMme::MidiInputPortMme* p = (MidiInputDeviceMme::MidiInputPortMme*)dwInstance;
34      p->MmeCallbackDispatcher(handle, uMsg, dwParam1, dwParam2);      p->MmeCallbackDispatcher(handle, uMsg, dwParam1, dwParam2);
35  }  }
# Line 151  void CALLBACK MidiInputDeviceMme::MidiIn Line 151  void CALLBACK MidiInputDeviceMme::MidiIn
151      }      }
152    
153      MidiInputDeviceMme::MidiInputPortMme::~MidiInputPortMme() {      MidiInputDeviceMme::MidiInputPortMme::~MidiInputPortMme() {
154          delete TmpSysExBuf;          delete[] TmpSysExBuf;
155          delete SysExBuf;          delete[] SysExBuf;
156      }      }
157    
158    
# Line 238  void MidiInputDeviceMme::MidiInputPortMm Line 238  void MidiInputDeviceMme::MidiInputPortMm
238    
239  }  }
240    
241  void MidiInputDeviceMme::MidiInputPortMme::MmeCallbackDispatcher(HMIDIIN handle, UINT uMsg, DWORD dwParam1, DWORD dwParam2) {  void MidiInputDeviceMme::MidiInputPortMme::MmeCallbackDispatcher(HMIDIIN handle, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) {
242    
243      unsigned char *DataPtr; // pointer to SysEx data      unsigned char *DataPtr; // pointer to SysEx data
244      unsigned char *data;  // pointer to standard MIDI messages which are not sysex data(max 3 bytes long)      unsigned char *data;  // pointer to standard MIDI messages which are not sysex data(max 3 bytes long)
# Line 246  void MidiInputDeviceMme::MidiInputPortMm Line 246  void MidiInputDeviceMme::MidiInputPortMm
246      data = (unsigned char *)&dwParam1;      data = (unsigned char *)&dwParam1;
247    
248      switch(uMsg) {      switch(uMsg) {
249          case MIM_DATA:          case MIM_DATA: {
250              DispatchRaw(data);              int32_t timeStamp = (dwParam2) ? *dwParam2 : 0;
251                DispatchRaw(data, timeStamp);
252              break;              break;
253            }
254    
255          case MIM_LONGDATA:          case MIM_LONGDATA:
256              if(!ExitFlag) {              if(!ExitFlag) {

Legend:
Removed from v.1889  
changed lines
  Added in v.2426

  ViewVC Help
Powered by ViewVC