From 687149d8d25083fd967d109b949d90058741ba0e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 22 Jan 2022 04:15:18 +0100 Subject: [PATCH] Require Session MIDI buffer for Triggerbox sidechain This fixes an issue when adding a MIDI track, but there there are no session-buffers for it, leading to: ARDOUR::Buffer& ARDOUR::BufferSet::get_available(ARDOUR::DataType, size_t): Assertioni < _available.get(type)' failed. --- libs/ardour/route.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index f4e9155cec..a30b460208 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -1982,6 +1982,11 @@ Route::configure_processors_unlocked (ProcessorStreams* err, Glib::Threads::RWLo processor_max_streams = ChanCount::max(processor_max_streams, iop->natural_input_streams()); processor_max_streams = ChanCount::max(processor_max_streams, iop->natural_output_streams()); } + else if (boost::dynamic_pointer_cast(*p) != 0) { + /* TB sidechain control input */ + processor_max_streams = ChanCount::max(processor_max_streams, c->first + ChanCount (DataType::MIDI, 1)); + } + out = c->second; if (boost::dynamic_pointer_cast (*p) @@ -2000,7 +2005,6 @@ Route::configure_processors_unlocked (ProcessorStreams* err, Glib::Threads::RWLo lr.release (); lm->acquire (); - if (_meter) { _meter->set_max_channels (processor_max_streams); }