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 * |
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 |
} |
} |
151 |
} |
} |
152 |
|
|
153 |
MidiInputDeviceMme::MidiInputPortMme::~MidiInputPortMme() { |
MidiInputDeviceMme::MidiInputPortMme::~MidiInputPortMme() { |
154 |
delete TmpSysExBuf; |
delete[] TmpSysExBuf; |
155 |
delete SysExBuf; |
delete[] SysExBuf; |
156 |
} |
} |
157 |
|
|
158 |
|
|
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) |
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) { |