mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 09:53: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
|
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
|
#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<HMIDIIN> midihin;
|
||||||
std::vector<HMIDIOUT> midihout;
|
std::vector<HMIDIOUT> midihout;
|
||||||
|
|
||||||
std::vector<QString> Midi::midiinexclude;
|
|
||||||
std::vector<QString> Midi::midioutexclude;
|
|
||||||
|
|
||||||
|
|
||||||
void CALLBACK MidiInProc(
|
void CALLBACK MidiInProc(
|
||||||
HMIDIIN hMidiIn,
|
HMIDIIN hMidiIn,
|
||||||
|
@ -147,6 +147,17 @@ void Midi::MidiCleanup() {
|
||||||
midihin.clear();
|
midihin.clear();
|
||||||
midihout.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
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -179,6 +190,7 @@ void Midi::USBchanged() {
|
||||||
|
|
||||||
QStringList Midi::listMidiDevices(bool output) {
|
QStringList Midi::listMidiDevices(bool output) {
|
||||||
QStringList rv;
|
QStringList rv;
|
||||||
|
#if defined Q_OS_WIN32
|
||||||
if (output) {
|
if (output) {
|
||||||
MIDIOUTCAPS outcaps;
|
MIDIOUTCAPS outcaps;
|
||||||
for (unsigned int i = 0; i < midiOutGetNumDevs(); i++) {
|
for (unsigned int i = 0; i < midiOutGetNumDevs(); i++) {
|
||||||
|
@ -193,6 +205,7 @@ QStringList Midi::listMidiDevices(bool output) {
|
||||||
rv.append(incaps.szPname);
|
rv.append(incaps.szPname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue