From 2b546a0c8edcd8b1f8917902461c7bbff61f7325 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 15 Apr 2021 23:15:48 +0200 Subject: [PATCH] Handle errors on startStream more nicely; might help with #1825. --- src/wx/film_viewer.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- 2.30.2