Browse Source

Warn when RtMidiDriver throws an exception.

tags/v2.1.1
Andrew Belt 2 years ago
parent
commit
b57b10f6fb
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/rtmidi.cpp

+ 7
- 2
src/rtmidi.cpp View File

@@ -398,8 +398,13 @@ void rtmidiInit() {
RtMidi::getCompiledApi(rtApis);
for (RtMidi::Api api : rtApis) {
int driverId = (int) api;
midi::Driver* driver = new RtMidiDriver(driverId);
midi::addDriver(driverId, driver);
try {
midi::Driver* driver = new RtMidiDriver(driverId);
midi::addDriver(driverId, driver);
}
catch (Exception& e) {
WARN("Could not create RtMidiDriver %d", api);
}
}
}



Loading…
Cancel
Save