Skip to content

Commit

Permalink
Warn when RtMidiDriver throws an exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBelt committed Mar 12, 2022
1 parent dda07a6 commit b57b10f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rtmidi.cpp
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit b57b10f

Please sign in to comment.