From b642e6dc0b2e86bdafc53e55a4f23b904bd8c7af Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 15 Feb 2023 00:26:25 +0100 Subject: Catch more exceptions from RtAudio (#2453). --- src/wx/film_viewer.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3