cerr << "\tSnapBBT\n";
cerr << "\tConfiguration\n";
cerr << "\tLatency\n";
+ cerr << "\tGraph\n";
}
static int
bits |= ARDOUR::DEBUG::Latency;
} else if (strncasecmp (p, "processors", strlen (p)) == 0) {
bits |= ARDOUR::DEBUG::Processors;
+ } else if (strncasecmp (p, "graph", strlen (p)) == 0) {
+ bits |= ARDOUR::DEBUG::Graph;
}
p = strtok_r (0, ",", &sp);
return;
}
- _route->listen_via (target, PreFader, true, true);
+ boost::shared_ptr<RouteList> rlist (new RouteList);
+ rlist->push_back (_route);
+
+ _session.add_internal_sends (target, PreFader, rlist);
}
void
#include "latency_gui.h"
#include "mixer_strip.h"
#include "automation_time_axis.h"
+#include "route_time_axis.h"
#include "ardour/route.h"
#include "ardour/event_type_map.h"
items.push_back (MenuElem(_("Assign all tracks (prefader)"), bind (mem_fun (*this, &RouteUI::create_sends), PreFader)));
items.push_back (MenuElem(_("Assign all tracks (postfader)"), bind (mem_fun (*this, &RouteUI::create_sends), PostFader)));
+ items.push_back (MenuElem(_("Assign selected tracks (prefader)"), bind (mem_fun (*this, &RouteUI::create_selected_sends), PreFader)));
+ items.push_back (MenuElem(_("Assign selected tracks (postfader)"), bind (mem_fun (*this, &RouteUI::create_selected_sends), PostFader)));
items.push_back (MenuElem(_("Copy track gains to sends"), mem_fun (*this, &RouteUI::set_sends_gain_from_track)));
items.push_back (MenuElem(_("Set sends gain to -inf"), mem_fun (*this, &RouteUI::set_sends_gain_to_zero)));
items.push_back (MenuElem(_("Set sends gain to 0dB"), mem_fun (*this, &RouteUI::set_sends_gain_to_unity)));
_session.globally_add_internal_sends (_route, p);
}
+void
+RouteUI::create_selected_sends (Placement p)
+{
+ boost::shared_ptr<RouteList> rlist (new RouteList);
+ TrackSelection& selected_tracks (ARDOUR_UI::instance()->the_editor().get_selection().tracks);
+
+ for (TrackSelection::iterator i = selected_tracks.begin(); i != selected_tracks.end(); ++i) {
+ RouteTimeAxisView* rtv;
+ RouteUI* rui;
+ if ((rtv = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {
+ if ((rui = dynamic_cast<RouteUI*>(rtv)) != 0) {
+ if (boost::dynamic_pointer_cast<AudioTrack>(rui->route())) {
+ rlist->push_back (rui->route());
+ }
+ }
+ }
+ }
+
+ _session.add_internal_sends (_route, p, rlist);
+}
+
void
RouteUI::set_sends_gain_from_track ()
{
void set_sends_gain_to_zero ();
void set_sends_gain_to_unity ();
void create_sends (ARDOUR::Placement);
+ void create_selected_sends (ARDOUR::Placement);
void solo_changed(void*);
void solo_changed_so_update_mute ();
SnapBBT = 0x8,
Configuration = 0x10,
Latency = 0x20,
- Processors = 0x40
+ Processors = 0x40,
+ Graph = 0x80
};
}
node.add_property("type", "delivery");
}
+ std::cerr << "delivery " << _name << " storing role " << _role << " as " << enum_2_string (_role) << std::endl;
+
node.add_property("role", enum_2_string(_role));
node.add_child_nocopy (_panner->state (full_state));
Amp::apply_simple_gain (mixbufs, nframes, tgain);
}
-
// Can't automate gain for sends or returns yet because we need different buffers
// so that we don't overwrite the main automation data for the route amp
// _amp->setup_gain_automation (start_frame, end_frame, nframes);
{
XMLNode& node (Send::state (full));
- /* this replaces any existing property */
+ /* this replaces any existing "type" property */
node.add_property ("type", "intsend");
bool
Route::feeds (boost::shared_ptr<Route> other, bool* only_send)
{
- // cerr << _name << endl;
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("Feeds? %1\n", _name));
if (_output->connected_to (other->input())) {
- // cerr << "\tdirect FEEDS " << other->name() << endl;
-
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tdirect FEEDS %2\n", other->name()));
if (only_send) {
*only_send = false;
}
if ((iop = boost::dynamic_pointer_cast<IOProcessor>(*r)) != 0) {
if (iop->feeds (other)) {
- // cerr << "\tIOP " << iop->name() << " feeds " << other->name() << endl;
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tIOP %1 does feed %2\n", iop->name(), other->name()));
if (only_send) {
*only_send = true;
}
return true;
} else {
- // cerr << "\tIOP " << iop->name() << " does NOT feeds " << other->name() << endl;
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tIOP %1 does NOT feed %2\n", iop->name(), other->name()));
}
+ } else {
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tPROC %1 is not an IOP\n", (*r)->name()));
}
+
}
- // cerr << "\tdoes NOT FEED " << other->name() << endl;
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tdoes NOT feed %1\n", other->name()));
return false;
}
add_internal_sends (dest, p, t);
}
-
void
Session::add_internal_sends (boost::shared_ptr<Route> dest, Placement p, boost::shared_ptr<RouteList> senders)
{
(*i)->listen_via (dest, p, true, true);
}
+
+ graph_reordered ();
}
void