From af5e812f00affc5d59cb01140895612e937d5452 Mon Sep 17 00:00:00 2001 From: Burt Sloane Date: Thu, 15 Jun 2017 15:56:49 -0700 Subject: [PATCH] neutralized for non-windows compile --- libraries/midi/src/Midi.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/libraries/midi/src/Midi.cpp b/libraries/midi/src/Midi.cpp index 5f5b4fa2f3..8ae6c085bb 100644 --- a/libraries/midi/src/Midi.cpp +++ b/libraries/midi/src/Midi.cpp @@ -22,6 +22,9 @@ static Midi* instance = NULL; // communicate this to non-class callbacks +std::vector Midi::midiinexclude; +std::vector Midi::midioutexclude; + #if defined Q_OS_WIN32 @@ -31,9 +34,6 @@ static Midi* instance = NULL; // communicate this to non-class callbacks std::vector midihin; std::vector midihout; -std::vector Midi::midiinexclude; -std::vector Midi::midioutexclude; - void CALLBACK MidiInProc( HMIDIIN hMidiIn, @@ -147,6 +147,17 @@ void Midi::MidiCleanup() { midihin.clear(); midihout.clear(); } +#else +void Midi::sendNote(int status, int note, int vel) { +} + +void Midi::MidiSetup() { + sendNote(0xb0, 0x7b, 0); // all notes off +} + +void Midi::MidiCleanup() { + sendNote(0xb0, 0x7b, 0); // all notes off +} #endif // @@ -179,6 +190,7 @@ void Midi::USBchanged() { QStringList Midi::listMidiDevices(bool output) { QStringList rv; +#if defined Q_OS_WIN32 if (output) { MIDIOUTCAPS outcaps; for (unsigned int i = 0; i < midiOutGetNumDevs(); i++) { @@ -193,6 +205,7 @@ QStringList Midi::listMidiDevices(bool output) { rv.append(incaps.szPname); } } +#endif return rv; }