From: Carl Hetherington Date: Tue, 14 Feb 2023 23:26:25 +0000 (+0100) Subject: Catch more exceptions from RtAudio (#2453). X-Git-Tag: v2.16.45~23 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=b642e6dc0b2e86bdafc53e55a4f23b904bd8c7af Catch more exceptions from RtAudio (#2453). --- 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 {