summaryrefslogtreecommitdiff
path: root/libs/ardour/internal_send.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-06-14 19:00:08 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-06-14 19:00:08 +0000
commit19610514166e42a3c860accf576beb3ac1381a42 (patch)
tree2e6d00995428aed7188f7fab774230f01d438b9e /libs/ardour/internal_send.cc
parenta5674e92712aacae648e8d55ec7b767b6d988542 (diff)
monitor send gets access to the (shared) pannable of the track/bus, thus ensuring that the monitor feed is panned. required a few fixes along the way
git-svn-id: svn://localhost/ardour2/branches/3.0@9731 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/internal_send.cc')
-rw-r--r--libs/ardour/internal_send.cc41
1 files changed, 38 insertions, 3 deletions
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index ed7c5e6bc3..d0497aa007 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -24,6 +24,8 @@
#include "ardour/audio_buffer.h"
#include "ardour/internal_send.h"
#include "ardour/meter.h"
+#include "ardour/panner.h"
+#include "ardour/panner_shell.h"
#include "ardour/route.h"
#include "ardour/session.h"
@@ -106,7 +108,18 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
// in-place, which a send must never do.
assert(mixbufs.available() >= bufs.count());
- mixbufs.read_from (bufs, nframes);
+
+ boost::shared_ptr<Panner> panner;
+
+ if (_panshell) {
+ panner = _panshell->panner();
+ }
+
+ if (panner && !panner->bypassed()) {
+ _panshell->run (bufs, mixbufs, start_frame, end_frame, nframes);
+ } else {
+ mixbufs.read_from (bufs, nframes);
+ }
/* gain control */
@@ -140,8 +153,6 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
_amp->run (mixbufs, start_frame, end_frame, nframes, true);
- /* XXX NEED TO PAN */
-
/* consider metering */
if (_metering) {
@@ -304,3 +315,27 @@ InternalSend::send_to_property_changed (const PropertyChange& what_changed)
set_name (_send_to->name ());
}
}
+
+void
+InternalSend::set_can_pan (bool yn)
+{
+ boost::shared_ptr<Panner> panner;
+
+ if (_panshell) {
+ panner = _panshell->panner ();
+ }
+
+ if (panner) {
+ panner->set_bypassed (!yn);
+ }
+}
+
+void
+InternalSend::cycle_start (pframes_t nframes)
+{
+ Delivery::cycle_start (nframes);
+
+ for (BufferSet::audio_iterator b = mixbufs.audio_begin(); b != mixbufs.audio_end(); ++b) {
+ (*b).prepare ();
+ }
+}