| 1060 | } |
| 1061 | |
| 1062 | void CtrlrPanel::handleAsyncUpdate() |
| 1063 | { |
| 1064 | /* let's check any pending multi midi messages |
| 1065 | in the queue */ |
| 1066 | for (int i=0; i<multiMidiQueue.size(); i++) |
| 1067 | { |
| 1068 | if (luaPanelMidiMultiReceivedCbk) |
| 1069 | getCtrlrLuaManager().getMethodManager().call (luaPanelMidiMultiReceivedCbk, multiMidiQueue[i]); |
| 1070 | |
| 1071 | multiMidiQueue.remove(i); |
| 1072 | } |
| 1073 | |
| 1074 | MidiBuffer buffer; |
| 1075 | |
| 1076 | midiMessageCollector.removeNextBlockOfMessages (buffer, SAMPLERATE * 512); |
| 1077 | |
| 1078 | /* We mute here, so we don't have to lock the value tree in the MIDI thread |
| 1079 | we need to empty the queue so it doesn't grow */ |
| 1080 | if (isMidiInPaused()) |
| 1081 | { |
| 1082 | return; |
| 1083 | } |
| 1084 | |
| 1085 | MidiBuffer::Iterator i(buffer); |
| 1086 | int time; |
| 1087 | MidiMessage m; |
| 1088 | bool luaValid = false; |
| 1089 | |
| 1090 | if (luaPanelMidiReceivedCbk) |
| 1091 | luaValid = luaPanelMidiReceivedCbk->isValid(); |
| 1092 | |
| 1093 | while (i.getNextEvent(m,time)) |
| 1094 | { |
| 1095 | if (luaValid) |
| 1096 | getCtrlrLuaManager().getMethodManager().call (luaPanelMidiReceivedCbk, CtrlrMidiMessage (m)); |
| 1097 | |
| 1098 | listeners.call (&CtrlrPanel::Listener::midiReceived, m, inputDevice); |
| 1099 | } |
| 1100 | } |
| 1101 | |
| 1102 | bool CtrlrPanel::getMidiOptionBool(const CtrlrPanelMidiOption optionToCheck) |
| 1103 | { |
nothing calls this directly
no test coverage detected