Use the appropriate RtAudio exception (though I'm not sure if this
authorCarl Hetherington <cth@carlh.net>
Fri, 25 Sep 2020 19:03:23 +0000 (21:03 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 25 Sep 2020 19:03:23 +0000 (21:03 +0200)
still necessary).

src/wx/config_dialog.cc
src/wx/film_viewer.cc

index 7a4bb92c9e16e1589785d8aac07377e6ebd2e102..8eddeab4dff6904f3caca18602c0a116b6fb9efe 100644 (file)
@@ -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 */
                }
        }
index 151b578cd8d4f05923fc1c4b7f33ad91d948580f..ff278d8a958f13882bf6ff49af78f52fb419bba9 100644 (file)
@@ -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;