Add GUI part to immediately fan-out multi-out instruments on track creation
This commit is contained in:
parent
7a36ce4925
commit
0808b87138
@ -1894,5 +1894,6 @@ int
|
||||
EditorRoutes::plugin_setup (boost::shared_ptr<Route> r, boost::shared_ptr<PluginInsert> pi, ARDOUR::Route::PluginSetupOptions flags)
|
||||
{
|
||||
PluginSetupDialog psd (r, pi, flags);
|
||||
return psd.run ();
|
||||
int rv = psd.run ();
|
||||
return rv + (psd.fan_out() ? 4 : 0);
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ PluginSetupDialog::PluginSetupDialog (boost::shared_ptr<ARDOUR::Route> r, boost:
|
||||
, _route (r)
|
||||
, _pi (pi)
|
||||
, _keep_mapping (_("Copy I/O Map"), ArdourButton::led_default_elements)
|
||||
, _fan_out (_("Fan out"), ArdourButton::led_default_elements)
|
||||
{
|
||||
assert (flags != Route::None);
|
||||
|
||||
@ -71,7 +72,7 @@ PluginSetupDialog::PluginSetupDialog (boost::shared_ptr<ARDOUR::Route> r, boost:
|
||||
f->add (*box);
|
||||
tbl->attach (*f, 0, 1, row, row + 1, EXPAND|FILL, SHRINK, 0, 8);
|
||||
|
||||
_keep_mapping.signal_clicked.connect (sigc::mem_fun (*this, &PluginSetupDialog::apply_mapping));
|
||||
_keep_mapping.signal_clicked.connect (sigc::mem_fun (*this, &PluginSetupDialog::apply_mapping));
|
||||
add_button ("Replace", 2);
|
||||
} else {
|
||||
|
||||
@ -86,16 +87,19 @@ PluginSetupDialog::PluginSetupDialog (boost::shared_ptr<ARDOUR::Route> r, boost:
|
||||
Box* box = manage (new HBox ());
|
||||
box->set_border_width (2);
|
||||
box->pack_start (_out_presets, true, true);
|
||||
box->pack_start (_fan_out, false, false);
|
||||
Frame* f = manage (new Frame ());
|
||||
f->set_label (_("Output Configuration"));
|
||||
f->add (*box);
|
||||
tbl->attach (*f, 1, 2, row, row + 1, EXPAND|FILL, SHRINK, 0, 8);
|
||||
_fan_out.signal_clicked.connect (sigc::mem_fun (*this, &PluginSetupDialog::toggle_fan_out));
|
||||
} else {
|
||||
_pi->set_preset_out (_pi->natural_output_streams ());
|
||||
update_sensitivity (_pi->natural_output_streams ().n_audio ());
|
||||
}
|
||||
|
||||
_keep_mapping.set_active (false);
|
||||
_fan_out.set_active (false);
|
||||
apply_mapping ();
|
||||
|
||||
add_button (Stock::ADD, 0);
|
||||
@ -162,6 +166,7 @@ PluginSetupDialog::update_sensitivity (uint32_t n_audio)
|
||||
} else {
|
||||
_keep_mapping.set_sensitive (false);
|
||||
}
|
||||
_fan_out.set_sensitive (n_audio > 2);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -190,6 +195,12 @@ PluginSetupDialog::apply_mapping ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PluginSetupDialog::toggle_fan_out ()
|
||||
{
|
||||
_fan_out.set_active (!_fan_out.get_active ());
|
||||
}
|
||||
|
||||
std::string
|
||||
PluginSetupDialog::preset_label (uint32_t n_audio) const
|
||||
{
|
||||
|
@ -30,6 +30,8 @@ class PluginSetupDialog : public ArdourDialog
|
||||
public:
|
||||
PluginSetupDialog (boost::shared_ptr<ARDOUR::Route>, boost::shared_ptr<ARDOUR::PluginInsert>, ARDOUR::Route::PluginSetupOptions);
|
||||
|
||||
bool fan_out () const { return _fan_out.get_active () && _fan_out.get_sensitive (); }
|
||||
|
||||
private:
|
||||
void setup_output_presets ();
|
||||
void update_sensitivity (uint32_t);
|
||||
@ -37,6 +39,7 @@ private:
|
||||
|
||||
void select_output_preset (uint32_t n_audio);
|
||||
void apply_mapping ();
|
||||
void toggle_fan_out ();
|
||||
|
||||
std::string preset_label (uint32_t) const;
|
||||
|
||||
@ -45,6 +48,7 @@ private:
|
||||
|
||||
ArdourDropdown _out_presets;
|
||||
ArdourButton _keep_mapping;
|
||||
ArdourButton _fan_out;
|
||||
ARDOUR::ChanCount _cur_inputs;
|
||||
ARDOUR::ChanCount _cur_outputs;
|
||||
};
|
||||
|
@ -285,6 +285,7 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
||||
_route->solo_safe_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context());
|
||||
_route->solo_isolate_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context());
|
||||
_route->phase_control()->Changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::polarity_changed, this), gui_context());
|
||||
_route->fan_out.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::fan_out, this, true, true), gui_context());
|
||||
|
||||
if (is_track()) {
|
||||
track()->FreezeChange.connect (*this, invalidator (*this), boost::bind (&RouteUI::map_frozen, this), gui_context());
|
||||
|
Loading…
Reference in New Issue
Block a user