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
Signed by: rgareus
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;
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) {
@ -664,6 +665,7 @@ FoldbackStrip::update_send_box ()
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;
@ -1076,6 +1078,7 @@ 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) {
@ -1091,6 +1094,7 @@ FoldbackStrip::duplicate_current_fb ()
}
}
}
#endif
set_route (new_fb);
route_rename ();
} else {

View File

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

View File

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