From: Carl Hetherington Date: Thu, 15 Apr 2021 21:15:48 +0000 (+0200) Subject: Handle errors on startStream more nicely; might help with #1825. X-Git-Tag: v2.15.141~66 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=2b546a0c8edcd8b1f8917902461c7bbff61f7325 Handle errors on startStream more nicely; might help with #1825. --- diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 8805d1311..4ea2a8b00 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -350,7 +350,15 @@ FilmViewer::start () */ if (_audio.isStreamOpen()) { _audio.setStreamTime (_video_view->position().seconds()); - _audio.startStream (); + try { + _audio.startStream (); + } catch (RtAudioError& e) { + _audio_channels = 0; + error_dialog ( + _video_view->get(), + _("There was a problem starting audio playback. Please try another audio output device in Preferences."), std_to_wx(e.what()) + ); + } } _playing = true;