Update fan-out signal
* Signals use camelcase. * use a static signal, independent of the route Previously the signal was handled by RouteUI, which caused various issues: * the RouteUI may not yet be available * There may be many RouteUIs for a single Route (mixer, editor-mixer, meter-bridge strips)
This commit is contained in:
parent
652f62f20a
commit
f0b25a776b
@ -384,11 +384,14 @@ public:
|
||||
MultiOut = 0x2,
|
||||
};
|
||||
|
||||
/** ask GUI about port-count, fan-out when adding instrument */
|
||||
static PBD::Signal3<int, boost::shared_ptr<Route>, boost::shared_ptr<PluginInsert>, PluginSetupOptions > PluginSetup;
|
||||
|
||||
/** used to signal the GUI to fan-out (track-creation) */
|
||||
static PBD::Signal1<void, boost::weak_ptr<Route> > FanOut;
|
||||
|
||||
/** 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;
|
||||
/** a processor's latency has changed
|
||||
* (emitted from PluginInsert::latency_changed)
|
||||
|
@ -103,6 +103,8 @@ using namespace PBD;
|
||||
|
||||
PBD::Signal3<int,boost::shared_ptr<Route>, boost::shared_ptr<PluginInsert>, Route::PluginSetupOptions > Route::PluginSetup;
|
||||
|
||||
PBD::Signal1<void, boost::weak_ptr<Route> > Route::FanOut;
|
||||
|
||||
/** Base class for all routable/mixable objects (tracks and busses) */
|
||||
Route::Route (Session& sess, string name, PresentationInfo::Flag flag, DataType default_type)
|
||||
: Stripable (sess, name, PresentationInfo (flag))
|
||||
@ -1151,7 +1153,9 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor>
|
||||
if (fanout && fanout->configured ()
|
||||
&& fanout->output_streams().n_audio() > 2
|
||||
&& boost::dynamic_pointer_cast<PluginInsert> (the_instrument ()) == fanout) {
|
||||
fan_out (); /* EMIT SIGNAL */
|
||||
/* This adds new tracks or busses, and changes connections.
|
||||
* This cannot be done here, and needs to be delegated to the GUI thread. */
|
||||
FanOut (boost::dynamic_pointer_cast<ARDOUR::Route>(shared_from_this())); /* EMIT SIGNAL */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user