From 70588baeacbe353db48bbb3f82b27ac0cecc1953 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 24 Jan 2020 15:56:23 -0700 Subject: handle engine failure between audio/MIDI setup and end of plugin scan --- gtk2_ardour/startup_fsm.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/startup_fsm.cc') diff --git a/gtk2_ardour/startup_fsm.cc b/gtk2_ardour/startup_fsm.cc index 5b7f0718e9..379504e655 100644 --- a/gtk2_ardour/startup_fsm.cc +++ b/gtk2_ardour/startup_fsm.cc @@ -300,7 +300,25 @@ StartupFSM::dialog_response_handler (int response, StartupFSM::DialogID dialog_i end_dialog (&plugin_scan_dialog); switch (response) { case RESPONSE_OK: - _signal_response (LoadSession); + if (AudioEngine::instance()->running()) { + _signal_response (LoadSession); + } else { + /* Engine died unexpectedly (it was + * running after + * WaitingForEngineParams). Nothing to + * do but go back to the audio/MIDI + * setup. It would be nice, perhaps, to + * show an extra message indicating + * that something is not right. + */ + ArdourMessageDialog msg (_("Ardour's audioengine has stopped running unexpectedly.\nSomething is probably wrong with your audio/MIDI device settings.")); + msg.set_position (WIN_POS_CENTER); + msg.run(); + /* This has been shown before, so we do + * not need start_audio_midi_setup (); + */ + show_audiomidi_dialog (); + } break; default: _signal_response (ExitProgram); -- cgit v1.2.3