From: Carl Hetherington Date: Fri, 25 Sep 2020 19:03:23 +0000 (+0200) Subject: Use the appropriate RtAudio exception (though I'm not sure if this X-Git-Tag: v2.15.103~4 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=e98f84b69cc9e4e67667326194f14abe422978d2 Use the appropriate RtAudio exception (though I'm not sure if this still necessary). --- 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;