mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 12:12:30 +02:00
neutralized for non-windows compile
This commit is contained in:
parent
7022c4009f
commit
af5e812f00
1 changed files with 16 additions and 3 deletions
|
@ -22,6 +22,9 @@
|
|||
|
||||
static Midi* instance = NULL; // communicate this to non-class callbacks
|
||||
|
||||
std::vector<QString> Midi::midiinexclude;
|
||||
std::vector<QString> Midi::midioutexclude;
|
||||
|
||||
|
||||
#if defined Q_OS_WIN32
|
||||
|
||||
|
@ -31,9 +34,6 @@ static Midi* instance = NULL; // communicate this to non-class callbacks
|
|||
std::vector<HMIDIIN> midihin;
|
||||
std::vector<HMIDIOUT> midihout;
|
||||
|
||||
std::vector<QString> Midi::midiinexclude;
|
||||
std::vector<QString> 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue