summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/opts.cc3
-rw-r--r--gtk2_ardour/processor_box.cc5
-rw-r--r--gtk2_ardour/route_ui.cc24
-rw-r--r--gtk2_ardour/route_ui.h1
-rw-r--r--libs/ardour/ardour/debug.h3
-rw-r--r--libs/ardour/delivery.cc2
-rw-r--r--libs/ardour/internal_send.cc3
-rw-r--r--libs/ardour/route.cc14
-rw-r--r--libs/ardour/session.cc3
9 files changed, 47 insertions, 11 deletions
diff --git a/gtk2_ardour/opts.cc b/gtk2_ardour/opts.cc
index c35927dad8..7ce66c176e 100644
--- a/gtk2_ardour/opts.cc
+++ b/gtk2_ardour/opts.cc
@@ -84,6 +84,7 @@ list_debug_options ()
cerr << "\tSnapBBT\n";
cerr << "\tConfiguration\n";
cerr << "\tLatency\n";
+ cerr << "\tGraph\n";
}
static int
@@ -123,6 +124,8 @@ parse_debug_options (const char* str)
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);
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index e9d52016ec..bd84d4ca0a 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -825,7 +825,10 @@ ProcessorBox::choose_aux (boost::weak_ptr<Route> wr)
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
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 5104601ba7..e06b9b18c4 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -44,6 +44,7 @@
#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"
@@ -534,6 +535,8 @@ RouteUI::build_sends_menu ()
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)));
@@ -547,6 +550,27 @@ RouteUI::create_sends (Placement 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 ()
{
_session.globally_set_send_gains_from_track (_route);
diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h
index 1b2aca1689..15eafb4e18 100644
--- a/gtk2_ardour/route_ui.h
+++ b/gtk2_ardour/route_ui.h
@@ -124,6 +124,7 @@ class RouteUI : public virtual AxisView
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 ();
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h
index 926d5520d7..f31c42675e 100644
--- a/libs/ardour/ardour/debug.h
+++ b/libs/ardour/ardour/debug.h
@@ -41,7 +41,8 @@ namespace ARDOUR {
SnapBBT = 0x8,
Configuration = 0x10,
Latency = 0x20,
- Processors = 0x40
+ Processors = 0x40,
+ Graph = 0x80
};
}
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index 3494be2cf5..a3d8903f34 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -362,6 +362,8 @@ Delivery::state (bool full_state)
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));
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index d70889a27c..dd67d541ea 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -109,7 +109,6 @@ InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
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);
@@ -153,7 +152,7 @@ InternalSend::state (bool full)
{
XMLNode& node (Send::state (full));
- /* this replaces any existing property */
+ /* this replaces any existing "type" property */
node.add_property ("type", "intsend");
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index e0543bdda9..02890808b7 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2399,11 +2399,10 @@ Route::set_comment (string cmt, void *src)
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;
}
@@ -2418,18 +2417,21 @@ Route::feeds (boost::shared_ptr<Route> other, bool* only_send)
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;
}
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 7edde902ea..0d5cdcacb5 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -2258,7 +2258,6 @@ Session::globally_add_internal_sends (boost::shared_ptr<Route> dest, Placement p
add_internal_sends (dest, p, t);
}
-
void
Session::add_internal_sends (boost::shared_ptr<Route> dest, Placement p, boost::shared_ptr<RouteList> senders)
{
@@ -2278,6 +2277,8 @@ Session::add_internal_sends (boost::shared_ptr<Route> dest, Placement p, boost::
(*i)->listen_via (dest, p, true, true);
}
+
+ graph_reordered ();
}
void