| 268 | } |
| 269 | } |
| 270 | std::vector<int> getInputDeviceIds() override { |
| 271 | // TODO The IDs unfortunately jump around in RtMidi. Is there a way to keep them constant when a MIDI device is added/removed? |
| 272 | int count; |
| 273 | try { |
| 274 | count = rtMidiIn->getPortCount(); |
| 275 | } |
| 276 | catch (RtMidiError& e) { |
| 277 | throw Exception("Failed to get RtMidi input device count: %s", e.what()); |
| 278 | } |
| 279 | |
| 280 | std::vector<int> deviceIds; |
| 281 | for (int i = 0; i < count; i++) |
| 282 | deviceIds.push_back(i); |
| 283 | return deviceIds; |
| 284 | } |
| 285 | |
| 286 | std::string getInputDeviceName(int deviceId) override { |
| 287 | if (deviceId < 0) |