Add pre/post fader to foldback send creation

add position param to send creation
	default all to prefader as first step
This commit is contained in:
Len Ovens 2020-08-08 18:41:03 -07:00
parent 5193052d8a
commit 5c6e8954ed
5 changed files with 16 additions and 9 deletions

View file

@ -416,7 +416,7 @@ FoldbackStrip::init ()
global_vpacker.set_border_width (1); global_vpacker.set_border_width (1);
global_vpacker.set_spacing (2); global_vpacker.set_spacing (2);
// Packing is from top down to the send box. Thje send box // Packing is from top down to the send box. The send box
// needs the most room and takes all left over space // needs the most room and takes all left over space
// Everything below the send box is packed from the bottom up // Everything below the send box is packed from the bottom up
// the panner is the last thing to pack as it doesn't always show // the panner is the last thing to pack as it doesn't always show
@ -1599,7 +1599,7 @@ FoldbackStrip::create_selected_sends (bool include_buses)
if ((*i)->is_selected() && !(*i)->is_master() && !(*i)->is_monitor()) { if ((*i)->is_selected() && !(*i)->is_master() && !(*i)->is_monitor()) {
boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route>(*i); boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route>(*i);
if (rt) { if (rt) {
rt->add_foldback_send (_route); rt->add_foldback_send (_route, false);
} }
} }
} }
@ -1664,7 +1664,8 @@ FoldbackStrip::duplicate_current_fb ()
if (i->sends_only) { if (i->sends_only) {
boost::shared_ptr<Route> rt (i->r.lock()); boost::shared_ptr<Route> rt (i->r.lock());
boost::shared_ptr<Send> old_snd = rt->internal_send_for (old_fb); boost::shared_ptr<Send> old_snd = rt->internal_send_for (old_fb);
rt->add_foldback_send (new_fb); // XXXX needs false to be replaced with value from duplicated send
rt->add_foldback_send (new_fb, false);
if (old_snd) { if (old_snd) {
float old_gain = old_snd->gain_control()->get_value (); float old_gain = old_snd->gain_control()->get_value ();
boost::shared_ptr<Send> new_snd = rt->internal_send_for (new_fb); boost::shared_ptr<Send> new_snd = rt->internal_send_for (new_fb);

View file

@ -2821,7 +2821,7 @@ ProcessorBox::choose_aux (boost::weak_ptr<Route> wr)
} }
if (target->is_foldbackbus ()) { if (target->is_foldbackbus ()) {
_route->add_foldback_send (target); _route->add_foldback_send (target, false);
} else { } else {
_session->add_internal_send (target, _placement, _route); _session->add_internal_send (target, _placement, _route);
} }

View file

@ -417,7 +417,7 @@ public:
PBD::Signal1<void,void*> SelectedChanged; PBD::Signal1<void,void*> SelectedChanged;
int add_aux_send (boost::shared_ptr<Route>, boost::shared_ptr<Processor>); int add_aux_send (boost::shared_ptr<Route>, boost::shared_ptr<Processor>);
int add_foldback_send (boost::shared_ptr<Route>); int add_foldback_send (boost::shared_ptr<Route>, bool post_fader);
void remove_aux_or_listen (boost::shared_ptr<Route>); void remove_aux_or_listen (boost::shared_ptr<Route>);
/** /**

View file

@ -3384,10 +3384,15 @@ Route::add_aux_send (boost::shared_ptr<Route> route, boost::shared_ptr<Processor
} }
int int
Route::add_foldback_send (boost::shared_ptr<Route> route) Route::add_foldback_send (boost::shared_ptr<Route> route, bool post_fader)
{ {
assert (route != _session.monitor_out ()); assert (route != _session.monitor_out ());
boost::shared_ptr<Processor> before = before_processor_for_placement (PreFader); boost::shared_ptr<Processor> before;
if (post_fader) {
before = before_processor_for_placement (PostFader);
} else {
before = before_processor_for_placement (PreFader);
}
{ {
Glib::Threads::RWLock::ReaderLock rm (_processor_lock); Glib::Threads::RWLock::ReaderLock rm (_processor_lock);
@ -3413,6 +3418,7 @@ Route::add_foldback_send (boost::shared_ptr<Route> route)
} }
listener->panner_shell()->set_linked_to_route (false); listener->panner_shell()->set_linked_to_route (false);
listener->set_pre_fader (!post_fader);
add_processor (listener, before); add_processor (listener, before);
} catch (failed_constructor& err) { } catch (failed_constructor& err) {

View file

@ -4323,7 +4323,7 @@ OSC::sel_new_personal_send (char *foldback, lo_message msg)
bool s_only = true; bool s_only = true;
if (!rt->feeds (lsn_rt, &s_only)) { if (!rt->feeds (lsn_rt, &s_only)) {
// create send // create send
rt->add_foldback_send (lsn_rt); rt->add_foldback_send (lsn_rt, false);
//boost::shared_ptr<Send> snd = rt->internal_send_for (aux); //boost::shared_ptr<Send> snd = rt->internal_send_for (aux);
session->dirty (); session->dirty ();
return 0; return 0;
@ -6608,7 +6608,7 @@ OSC::cue_new_send (string rt_name, lo_message msg)
bool s_only = true; bool s_only = true;
if (!rt_send->feeds (aux, &s_only)) { if (!rt_send->feeds (aux, &s_only)) {
// create send // create send
rt_send->add_foldback_send (aux); rt_send->add_foldback_send (aux, false);
boost::shared_ptr<Send> snd = rt_send->internal_send_for (aux); boost::shared_ptr<Send> snd = rt_send->internal_send_for (aux);
session->dirty (); session->dirty ();
return 0; return 0;