diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-01-16 15:29:25 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-01-16 15:29:38 -0600 |
commit | c60d8cf747421fc3acbba1719c7d913ab548ccdf (patch) | |
tree | 3afce632db8a7bb634345316c677a0a6c4945f70 /gtk2_ardour | |
parent | 4c064081af23656c6b1bef756e23b20b9770a213 (diff) |
(libs) call ARDOUR::init_post_engine() from within libardour rather than requiring "users" of the library to arrange for it
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 3 |
2 files changed, 4 insertions, 10 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 9843fb71db..8b025f1c3a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -287,7 +287,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) , _was_dirty (false) , _mixer_on_top (false) , _initial_verbose_plugin_scan (false) - , first_time_engine_run (true) , secondary_clock_spacer (0) , auto_input_button (ArdourButton::led_default_elements) , time_info_box (0) @@ -567,7 +566,7 @@ ARDOUR_UI::create_global_port_matrix (ARDOUR::DataType type) void ARDOUR_UI::attach_to_engine () { - AudioEngine::instance()->Running.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_running, this), gui_context()); + AudioEngine::instance()->Running.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_running, this, _1), gui_context()); ARDOUR::Port::set_connecting_blocked (ARDOUR_COMMAND_LINE::no_connect_ports); } @@ -582,12 +581,10 @@ ARDOUR_UI::engine_stopped () } void -ARDOUR_UI::engine_running () +ARDOUR_UI::engine_running (uint32_t cnt) { - ENSURE_GUI_THREAD (*this, &ARDOUR_UI::engine_running) - if (first_time_engine_run) { + if (cnt == 0) { post_engine(); - first_time_engine_run = false; } if (_session) { @@ -659,8 +656,6 @@ ARDOUR_UI::post_engine () } #endif - ARDOUR::init_post_engine (); - /* connect to important signals */ AudioEngine::instance()->Stopped.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_stopped, this), gui_context()); diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index d5fa18da73..db6b30fd60 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -400,7 +400,6 @@ private: bool _was_dirty; bool _mixer_on_top; bool _initial_verbose_plugin_scan; - bool first_time_engine_run; void hide_tabbable (ArdourWidgets::Tabbable*); void detach_tabbable (ArdourWidgets::Tabbable*); @@ -439,7 +438,7 @@ private: void engine_halted (const char* reason, bool free_reason); void engine_stopped (); - void engine_running (); + void engine_running (uint32_t cnt); void use_config (); |