Fix session loading when aborting latency measurement #8691
Stop the engine if it was started for latency measurement but measurement was aborted. Previously the engine was kept running and the "Start' button was not available. If this happened during initial session loading, a user would have to manually restart the engine to proceed.
This commit is contained in:
parent
0fc50b9bf2
commit
3a7304ca01
@ -2966,6 +2966,8 @@ EngineControl::on_switch_page (GtkNotebookPage*, guint page_num)
|
||||
if (page_num == latency_tab) {
|
||||
/* latency tab */
|
||||
|
||||
was_running_before_lm = ARDOUR::AudioEngine::instance()->running();
|
||||
|
||||
if (ARDOUR::AudioEngine::instance()->running()) {
|
||||
stop_engine (true);
|
||||
}
|
||||
@ -3199,6 +3201,14 @@ EngineControl::latency_back_button_clicked ()
|
||||
|
||||
ARDOUR::AudioEngine::instance()->stop_latency_detection ();
|
||||
notebook.set_current_page(0);
|
||||
|
||||
boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
|
||||
if (backend && backend->can_change_systemic_latency_when_running ()) {
|
||||
/* IFF engine was not running before latency detection, stop it */
|
||||
if (!was_running_before_lm && ARDOUR::AudioEngine::instance()->running()) {
|
||||
stop_engine ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -131,6 +131,7 @@ private:
|
||||
Gtk::VBox lm_vbox;
|
||||
bool have_lm_results;
|
||||
bool lm_running;
|
||||
bool was_running_before_lm;
|
||||
|
||||
/* MIDI Tab */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user