diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-25 21:04:06 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-25 21:04:06 +0200 |
| commit | d7cf091bdbbeae8187e887104d1135e93bcdf5da (patch) | |
| tree | f94ebe4a5342a10a6aab012d3a7c14bc4dfd8261 | |
| parent | e98f84b69cc9e4e67667326194f14abe422978d2 (diff) | |
Add missing try/catch to a call to getDeviceInfo.
| -rw-r--r-- | src/wx/config_dialog.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 8eddeab4d..fe8e84795 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -995,9 +995,17 @@ SoundPage::config_changed () int channels = 0; if (configured_so) { for (unsigned int i = 0; i < audio.getDeviceCount(); ++i) { - RtAudio::DeviceInfo info = audio.getDeviceInfo(i); - if (info.name == *configured_so && info.outputChannels > 0) { - channels = info.outputChannels; + try { + RtAudio::DeviceInfo info = audio.getDeviceInfo(i); + if (info.name == *configured_so && info.outputChannels > 0) { + channels = info.outputChannels; + } +#ifdef DCPOMATIC_USE_RTERROR + } catch (RtError&) { +#else + } catch (RtAudioError&) { +#endif + /* Never mind */ } } } |
