more debugging for MIDI input via WinMME
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 6 Oct 2015 16:41:49 +0000 (12:41 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 6 Oct 2015 16:42:01 +0000 (12:42 -0400)
libs/backends/portaudio/winmmemidi_input_device.cc

index ed8f23b45ed89687fa3b9bf0944d0539f5a10d9b..9a4de275c1c2d1a39fcf619d8be66d3b3437e576 100644 (file)
@@ -209,18 +209,22 @@ WinMMEMidiInputDevice::winmm_input_callback(HMIDIIN handle,
        switch (msg) {
        case MIM_OPEN:
        case MIM_CLOSE:
+               DEBUG_MIDI("WinMME: devices changed callback\n");
                // devices_changed_callback
                break;
        case MIM_MOREDATA:
+               DEBUG_MIDI("WinMME: more data ..\n");
                // passing MIDI_IO_STATUS to midiInOpen means that MIM_MOREDATA
                // will be sent when the callback isn't processing MIM_DATA messages
                // fast enough to keep up with messages arriving at input device
                // driver. I'm not sure what could be done differently if that occurs
                // so just handle MIM_DATA as per normal
        case MIM_DATA:
+               DEBUG_MIDI(string_compose ("WinMME: short msg @ %1\n", (uint32_t) timestamp));
                midi_input->handle_short_msg ((const uint8_t*)&midi_msg, (uint32_t)timestamp);
                break;
        case MIM_LONGDATA:
+               DEBUG_MIDI(string_compose ("WinMME: long msg @ %1\n", (uint32_t) timestamp));
                midi_input->handle_sysex_msg ((MIDIHDR*)&midi_msg, (uint32_t)timestamp);
                break;
        case MIM_ERROR:
@@ -229,6 +233,9 @@ WinMMEMidiInputDevice::winmm_input_callback(HMIDIIN handle,
        case MIM_LONGERROR:
                DEBUG_MIDI ("WinMME: Driver sent an invalid or incomplete SYSEX message\n");
                break;
+       default:
+               DEBUG_MIDI ("WinMME: Driver sent an unknown message\n");
+               break;
        }
 }