void ab_plugins (bool forward);
void clear_processors (Placement);
void all_visible_processors_active (bool);
+ void move_instrument_down (bool postfader = false);
bool strict_io () const { return _strict_io; }
bool set_strict_io (bool);
/** the processors have changed; the parameter indicates what changed */
PBD::Signal1<void,RouteProcessorChange> processors_changed;
+ PBD::Signal0<void> fan_out; // used to signal the GUI to fan-out (track-creation)
PBD::Signal1<void,void*> record_enable_changed;
PBD::Signal0<void> processor_latency_changed;
/** the metering point has changed */
Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor> before, ProcessorStreams* err)
{
ProcessorList::iterator loc;
+ boost::shared_ptr <PluginInsert> fanout;
if (before) {
loc = find(_processors.begin(), _processors.end(), before);
if (flags != None) {
boost::optional<int> rv = PluginSetup (shared_from_this (), pi, flags); /* EMIT SIGNAL */
- switch (rv.get_value_or (0)) {
+ int mode = rv.get_value_or (0);
+ switch (mode & 3) {
case 1:
to_skip.push_back (*i); // don't add this one;
break;
default:
break;
}
+ if ((mode & 5) == 4) {
+ fanout = pi;
+ }
}
}
processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
set_processor_positions ();
+ if (fanout && fanout->configured ()
+ && fanout->output_streams().n_audio() > 2
+ && boost::dynamic_pointer_cast<PluginInsert> (the_instrument ()) == fanout) {
+ fan_out (); /* EMIT SIGNAL */
+ }
return 0;
}
maybe_note_meter_position ();
}
+void
+Route::move_instrument_down (bool postfader)
+{
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
+ ProcessorList new_order;
+ boost::shared_ptr<Processor> instrument;
+ for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
+ boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert>(*i);
+ if (pi && pi->plugin ()->get_info ()->is_instrument ()) {
+ instrument = *i;
+ } else if (instrument && *i == _amp) {
+ if (postfader) {
+ new_order.push_back (*i);
+ new_order.push_back (instrument);
+ } else {
+ new_order.push_back (instrument);
+ new_order.push_back (*i);
+ }
+ } else {
+ new_order.push_back (*i);
+ }
+ }
+ if (!instrument) {
+ return;
+ }
+ lm.release ();
+ reorder_processors (new_order, 0);
+}
+
int
Route::reorder_processors (const ProcessorList& new_order, ProcessorStreams* err)
{
if (strict_io) {
pi->set_strict_io (true);
}
+
(*r)->add_processor (pi, PreFader);
+
+ if (Profile->get_mixbus () && pi->configured () && pi->output_streams().n_audio() > 2) {
+ (*r)->move_instrument_down (false);
+ }
}
}
}
if (strict_io) {
pi->set_strict_io (true);
}
+
(*r)->add_processor (pi, PreFader);
+
+ if (Profile->get_mixbus () && pi->configured () && pi->output_streams().n_audio() > 2) {
+ (*r)->move_instrument_down (false);
+ }
}
}
}