mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Fix Thread & Lock issues when adding Triggerbox w/sidechain
Track::init() must not call `add_processor` directly. The track is not in the process graph, yet and hence various calls (e.g. lock graph, update latency etc) are not applicable. Furthermore ::add_midi_sidechain() calls IO::add_port() which takes the process-lock. The solution is to create the Triggerbox early on and let Route::init deal with it like any other internal processors.
This commit is contained in:
parent
687149d8d2
commit
0e6561b009
1 changed files with 6 additions and 7 deletions
|
|
@ -87,6 +87,12 @@ Track::~Track ()
|
||||||
int
|
int
|
||||||
Track::init ()
|
Track::init ()
|
||||||
{
|
{
|
||||||
|
if (!is_auditioner()) {
|
||||||
|
_triggerbox = boost::shared_ptr<TriggerBox> (new TriggerBox (_session, data_type ()));
|
||||||
|
_triggerbox->set_owner (this);
|
||||||
|
_triggerbox->add_midi_sidechain ();
|
||||||
|
}
|
||||||
|
|
||||||
if (Route::init ()) {
|
if (Route::init ()) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -105,13 +111,6 @@ Track::init ()
|
||||||
* patchbays and elsewhere (or special-case code in those places)
|
* patchbays and elsewhere (or special-case code in those places)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!is_auditioner()) {
|
|
||||||
boost::shared_ptr<TriggerBox> tb (new TriggerBox (_session, data_type ()));
|
|
||||||
tb->set_owner (this);
|
|
||||||
add_processor (tb, _polarity);
|
|
||||||
tb->add_midi_sidechain ();
|
|
||||||
}
|
|
||||||
|
|
||||||
set_align_choice_from_io ();
|
set_align_choice_from_io ();
|
||||||
|
|
||||||
boost::shared_ptr<Route> rp (boost::dynamic_pointer_cast<Route> (shared_from_this()));
|
boost::shared_ptr<Route> rp (boost::dynamic_pointer_cast<Route> (shared_from_this()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue