summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-15 23:15:48 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-15 23:15:48 +0200
commit2b546a0c8edcd8b1f8917902461c7bbff61f7325 (patch)
treef6abbc74adac85b6f8bc37b16fc719e272ce865a
parent3ac44bf37777784de558219468a10ad1c0611f81 (diff)
Handle errors on startStream more nicely; might help with #1825.
-rw-r--r--src/wx/film_viewer.cc10
1 files changed, 9 insertions, 1 deletions
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;