mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
Handle all errors when starting backend in EngineDialog
This commit is contained in:
parent
4b9e738636
commit
1195aeb64e
2 changed files with 16 additions and 3 deletions
|
|
@ -407,6 +407,18 @@ EngineControl::on_show ()
|
||||||
ok_button->grab_focus();
|
ok_button->grab_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
EngineControl::start_engine ()
|
||||||
|
{
|
||||||
|
if (push_state_to_backend(true) != 0) {
|
||||||
|
MessageDialog msg(*this,
|
||||||
|
ARDOUR::AudioEngine::instance()->get_last_backend_error());
|
||||||
|
msg.run();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EngineControl::on_response (int response_id)
|
EngineControl::on_response (int response_id)
|
||||||
{
|
{
|
||||||
|
|
@ -414,7 +426,7 @@ EngineControl::on_response (int response_id)
|
||||||
|
|
||||||
switch (response_id) {
|
switch (response_id) {
|
||||||
case RESPONSE_OK:
|
case RESPONSE_OK:
|
||||||
if (push_state_to_backend(true) != 0) {
|
if (!start_engine()) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
hide();
|
hide();
|
||||||
|
|
@ -2327,7 +2339,7 @@ EngineControl::push_state_to_backend (bool start)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start || (was_running && restart_required)) {
|
if (start || (was_running && restart_required)) {
|
||||||
if (ARDOUR_UI::instance()->reconnect_to_engine()) {
|
if (ARDOUR::AudioEngine::instance()->start()) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2501,7 +2513,7 @@ EngineControl::start_stop_button_clicked ()
|
||||||
if (ARDOUR::AudioEngine::instance()->running()) {
|
if (ARDOUR::AudioEngine::instance()->running()) {
|
||||||
ARDOUR::AudioEngine::instance()->stop ();
|
ARDOUR::AudioEngine::instance()->stop ();
|
||||||
} else {
|
} else {
|
||||||
push_state_to_backend (true);
|
start_engine ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -299,6 +299,7 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
|
||||||
int push_state_to_backend (bool start);
|
int push_state_to_backend (bool start);
|
||||||
void post_push ();
|
void post_push ();
|
||||||
void update_sensitivity ();
|
void update_sensitivity ();
|
||||||
|
bool start_engine ();
|
||||||
|
|
||||||
/* latency measurement */
|
/* latency measurement */
|
||||||
void latency_button_clicked ();
|
void latency_button_clicked ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue