| 331 | } |
| 332 | |
| 333 | std::vector<int> getOutputDeviceIds() override { |
| 334 | // TODO The IDs unfortunately jump around in RtMidi. Is there a way to keep them constant when a MIDI device is added/removed? |
| 335 | int count; |
| 336 | try { |
| 337 | count = rtMidiOut->getPortCount(); |
| 338 | } |
| 339 | catch (RtMidiError& e) { |
| 340 | throw Exception("Failed to get RtMidi output device count: %s", e.what()); |
| 341 | } |
| 342 | |
| 343 | std::vector<int> deviceIds; |
| 344 | for (int i = 0; i < count; i++) |
| 345 | deviceIds.push_back(i); |
| 346 | return deviceIds; |
| 347 | } |
| 348 | |
| 349 | std::string getOutputDeviceName(int deviceId) override { |
| 350 | if (deviceId < 0) |