(libs) call ARDOUR::init_post_engine() from within libardour rather than requiring "users" of the library to arrange for it
This commit is contained in:
parent
4c064081af
commit
c60d8cf747
|
@ -287,7 +287,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||||
, _was_dirty (false)
|
, _was_dirty (false)
|
||||||
, _mixer_on_top (false)
|
, _mixer_on_top (false)
|
||||||
, _initial_verbose_plugin_scan (false)
|
, _initial_verbose_plugin_scan (false)
|
||||||
, first_time_engine_run (true)
|
|
||||||
, secondary_clock_spacer (0)
|
, secondary_clock_spacer (0)
|
||||||
, auto_input_button (ArdourButton::led_default_elements)
|
, auto_input_button (ArdourButton::led_default_elements)
|
||||||
, time_info_box (0)
|
, time_info_box (0)
|
||||||
|
@ -567,7 +566,7 @@ ARDOUR_UI::create_global_port_matrix (ARDOUR::DataType type)
|
||||||
void
|
void
|
||||||
ARDOUR_UI::attach_to_engine ()
|
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);
|
ARDOUR::Port::set_connecting_blocked (ARDOUR_COMMAND_LINE::no_connect_ports);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,12 +581,10 @@ ARDOUR_UI::engine_stopped ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::engine_running ()
|
ARDOUR_UI::engine_running (uint32_t cnt)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD (*this, &ARDOUR_UI::engine_running)
|
if (cnt == 0) {
|
||||||
if (first_time_engine_run) {
|
|
||||||
post_engine();
|
post_engine();
|
||||||
first_time_engine_run = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
|
@ -659,8 +656,6 @@ ARDOUR_UI::post_engine ()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ARDOUR::init_post_engine ();
|
|
||||||
|
|
||||||
/* connect to important signals */
|
/* connect to important signals */
|
||||||
|
|
||||||
AudioEngine::instance()->Stopped.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_stopped, this), gui_context());
|
AudioEngine::instance()->Stopped.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_stopped, this), gui_context());
|
||||||
|
|
|
@ -400,7 +400,6 @@ private:
|
||||||
bool _was_dirty;
|
bool _was_dirty;
|
||||||
bool _mixer_on_top;
|
bool _mixer_on_top;
|
||||||
bool _initial_verbose_plugin_scan;
|
bool _initial_verbose_plugin_scan;
|
||||||
bool first_time_engine_run;
|
|
||||||
|
|
||||||
void hide_tabbable (ArdourWidgets::Tabbable*);
|
void hide_tabbable (ArdourWidgets::Tabbable*);
|
||||||
void detach_tabbable (ArdourWidgets::Tabbable*);
|
void detach_tabbable (ArdourWidgets::Tabbable*);
|
||||||
|
@ -439,7 +438,7 @@ private:
|
||||||
|
|
||||||
void engine_halted (const char* reason, bool free_reason);
|
void engine_halted (const char* reason, bool free_reason);
|
||||||
void engine_stopped ();
|
void engine_stopped ();
|
||||||
void engine_running ();
|
void engine_running (uint32_t cnt);
|
||||||
|
|
||||||
void use_config ();
|
void use_config ();
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,6 @@ load_session (string dir, string state)
|
||||||
::exit (1);
|
::exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
init_post_engine ();
|
|
||||||
|
|
||||||
if (engine->start () != 0) {
|
if (engine->start () != 0) {
|
||||||
std::cerr << "Cannot start Audio/MIDI engine\n";
|
std::cerr << "Cannot start Audio/MIDI engine\n";
|
||||||
::exit (1);
|
::exit (1);
|
||||||
|
|
|
@ -139,8 +139,6 @@ static Session * _load_session (string dir, string state)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_post_engine ();
|
|
||||||
|
|
||||||
if (engine->start () != 0) {
|
if (engine->start () != 0) {
|
||||||
std::cerr << "Cannot start Audio/MIDI engine\n";
|
std::cerr << "Cannot start Audio/MIDI engine\n";
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -194,8 +192,6 @@ SessionUtils::create_session (string dir, string state, float sample_rate)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_post_engine ();
|
|
||||||
|
|
||||||
if (engine->start () != 0) {
|
if (engine->start () != 0) {
|
||||||
std::cerr << "Cannot start Audio/MIDI engine\n";
|
std::cerr << "Cannot start Audio/MIDI engine\n";
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user