summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-02-15 00:26:25 +0100
committerCarl Hetherington <cth@carlh.net>2023-02-21 20:44:11 +0100
commitb642e6dc0b2e86bdafc53e55a4f23b904bd8c7af (patch)
tree8fe9c9b0f13abb7f501e209d073fc29d2e52daf5 /src
parent25a119e21cfb73fdef4571d6abc322cb7d8cf92e (diff)
Catch more exceptions from RtAudio (#2453).
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_viewer.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index fb02f0a0f..e7dcf5642 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -622,10 +622,18 @@ FilmViewer::config_changed (Config::Property p)
++st;
}
if (st == _audio.getDeviceCount()) {
- st = _audio.getDefaultOutputDevice();
+ try {
+ st = _audio.getDefaultOutputDevice();
+ } catch (RtAudioError&) {
+ /* Something went wrong with that device so we don't want to use it anyway */
+ }
}
} else {
- st = _audio.getDefaultOutputDevice();
+ try {
+ st = _audio.getDefaultOutputDevice();
+ } catch (RtAudioError&) {
+ /* Something went wrong with that device so we don't want to use it anyway */
+ }
}
try {