Use new Route fed-by API (1/2)

This commit is contained in:
Robin Gareus 2022-04-29 03:37:01 +02:00
parent 9ad154f265
commit 9b1440ab23
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 11 additions and 24 deletions

View File

@ -656,16 +656,9 @@ FoldbackStrip::update_send_box ()
StripableList stripables;
stripables.clear ();
#if 0
Route::FedBy fed_by = _route->fed_by ();
for (Route::FedBy::iterator i = fed_by.begin (); i != fed_by.end (); ++i) {
if (i->sends_only) {
boost::shared_ptr<Route> rt (i->r.lock ());
boost::shared_ptr<Stripable> s = boost::dynamic_pointer_cast<Stripable> (rt);
stripables.push_back (s);
}
for (auto const& s : _route->signal_sources (true)) {
stripables.push_back (s);
}
#endif
stripables.sort (StripableByPresentationOrder ());
for (StripableList::iterator it = stripables.begin (); it != stripables.end (); ++it) {
boost::shared_ptr<Stripable> s_sp = *it;
@ -1078,23 +1071,17 @@ FoldbackStrip::duplicate_current_fb ()
double oldgain = old_fb->gain_control ()->get_value ();
new_fb->gain_control ()->set_value (oldgain * 0.25, PBD::Controllable::NoGroup);
#if 0
Route::FedBy fed_by = old_fb->fed_by ();
for (Route::FedBy::iterator i = fed_by.begin (); i != fed_by.end (); ++i) {
if (i->sends_only) {
boost::shared_ptr<Route> rt (i->r.lock ());
boost::shared_ptr<Send> old_snd = rt->internal_send_for (old_fb);
boost::shared_ptr<Processor> old_proc = old_snd;
bool old_pre = old_proc->get_pre_fader ();
rt->add_foldback_send (new_fb, !old_pre);
if (old_snd) {
float old_gain = old_snd->gain_control ()->get_value ();
boost::shared_ptr<Send> new_snd = rt->internal_send_for (new_fb);
new_snd->gain_control ()->set_value (old_gain, PBD::Controllable::NoGroup);
}
for (auto const& rt : old_fb->signal_sources (true)) {
boost::shared_ptr<Send> old_snd = rt->internal_send_for (old_fb);
boost::shared_ptr<Processor> old_proc = old_snd;
bool old_pre = old_proc->get_pre_fader ();
rt->add_foldback_send (new_fb, !old_pre);
if (old_snd) {
float old_gain = old_snd->gain_control ()->get_value ();
boost::shared_ptr<Send> new_snd = rt->internal_send_for (new_fb);
new_snd->gain_control ()->set_value (old_gain, PBD::Controllable::NoGroup);
}
}
#endif
set_route (new_fb);
route_rename ();
} else {