Prepare for GraphNode::feeds () and fed-by API update (1/2)

This commit is contained in:
Robin Gareus 2022-04-29 00:17:35 +02:00
parent 078e652859
commit f2016f2408
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 8 additions and 3 deletions

View file

@ -656,6 +656,7 @@ FoldbackStrip::update_send_box ()
StripableList stripables; StripableList stripables;
stripables.clear (); stripables.clear ();
#if 0
Route::FedBy fed_by = _route->fed_by (); Route::FedBy fed_by = _route->fed_by ();
for (Route::FedBy::iterator i = fed_by.begin (); i != fed_by.end (); ++i) { for (Route::FedBy::iterator i = fed_by.begin (); i != fed_by.end (); ++i) {
if (i->sends_only) { if (i->sends_only) {
@ -664,6 +665,7 @@ FoldbackStrip::update_send_box ()
stripables.push_back (s); stripables.push_back (s);
} }
} }
#endif
stripables.sort (StripableByPresentationOrder ()); stripables.sort (StripableByPresentationOrder ());
for (StripableList::iterator it = stripables.begin (); it != stripables.end (); ++it) { for (StripableList::iterator it = stripables.begin (); it != stripables.end (); ++it) {
boost::shared_ptr<Stripable> s_sp = *it; boost::shared_ptr<Stripable> s_sp = *it;
@ -1076,6 +1078,7 @@ FoldbackStrip::duplicate_current_fb ()
double oldgain = old_fb->gain_control ()->get_value (); double oldgain = old_fb->gain_control ()->get_value ();
new_fb->gain_control ()->set_value (oldgain * 0.25, PBD::Controllable::NoGroup); new_fb->gain_control ()->set_value (oldgain * 0.25, PBD::Controllable::NoGroup);
#if 0
Route::FedBy fed_by = old_fb->fed_by (); Route::FedBy fed_by = old_fb->fed_by ();
for (Route::FedBy::iterator i = fed_by.begin (); i != fed_by.end (); ++i) { for (Route::FedBy::iterator i = fed_by.begin (); i != fed_by.end (); ++i) {
if (i->sends_only) { if (i->sends_only) {
@ -1091,6 +1094,7 @@ FoldbackStrip::duplicate_current_fb ()
} }
} }
} }
#endif
set_route (new_fb); set_route (new_fb);
route_rename (); route_rename ();
} else { } else {

View file

@ -241,7 +241,7 @@ IOButton::button_press (GdkEventButton* ev)
if ((*i)->is_foldbackbus ()) { if ((*i)->is_foldbackbus ()) {
continue; continue;
} }
if (_route->feeds_according_to_graph (*i)) { if (_route->feeds (*i)) {
/* do not offer connections that would cause feedback */ /* do not offer connections that would cause feedback */
continue; continue;
} }
@ -255,7 +255,7 @@ IOButton::button_press (GdkEventButton* ev)
if ((*i)->is_foldbackbus () || _route->is_foldbackbus ()) { if ((*i)->is_foldbackbus () || _route->is_foldbackbus ()) {
continue; continue;
} }
if ((*i)->feeds_according_to_graph (_route)) { if ((*i)->feeds (_route)) {
/* do not offer connections that would cause feedback */ /* do not offer connections that would cause feedback */
continue; continue;
} }

View file

@ -1871,7 +1871,8 @@ PluginPinWidget::maybe_add_route_to_input_menu (boost::shared_ptr<Route> r, Data
return added; return added;
} }
if (_route ()->feeds_according_to_graph (r)) { if (_route ()->feeds (r)) {
/* do not allow connfeedback */
return added; return added;
} }