From e98f84b69cc9e4e67667326194f14abe422978d2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 25 Sep 2020 21:03:23 +0200 Subject: [PATCH] Use the appropriate RtAudio exception (though I'm not sure if this still necessary). --- src/wx/config_dialog.cc | 10 +++++++++- src/wx/film_viewer.cc | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 7a4bb92c9..8eddeab4d 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -927,7 +927,11 @@ SoundPage::sound_output_changed () string default_device; try { default_device = audio.getDeviceInfo(audio.getDefaultOutputDevice()).name; +#ifdef DCPOMATIC_USE_RTERROR + } catch (RtError&) { +#else } catch (RtAudioError&) { +#endif /* Never mind */ } if (!so || *so == default_device) { @@ -954,7 +958,11 @@ SoundPage::config_changed () RtAudio audio (DCPOMATIC_RTAUDIO_API); try { configured_so = audio.getDeviceInfo(audio.getDefaultOutputDevice()).name; - } catch (RtAudioError& e) { +#ifdef DCPOMATIC_USE_RTERROR + } catch (RtError&) { +#else + } catch (RtAudioError&) { +#endif /* Probably no audio devices at all */ } } diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 151b578cd..ff278d8a9 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -534,7 +534,11 @@ FilmViewer::config_changed (Config::Property p) if (_audio.getDeviceInfo(st).name == Config::instance()->sound_output().get()) { break; } +#ifdef DCPOMATIC_USE_RTERROR + } catch (RtError&) { +#else } catch (RtAudioError&) { +#endif /* Something went wrong with that device so we don't want to use it anyway */ } ++st; -- 2.30.2