void flush_buffers (framecnt_t nframes, framepos_t time);
void no_outs_cuz_we_no_monitor(bool);
- void cycle_start (pframes_t);
+ virtual void cycle_start (pframes_t);
void transport_stopped (framepos_t frame);
void realtime_locate ();
XMLNode& get_state(void);
int set_state(const XMLNode& node, int version);
+ void cycle_start (pframes_t);
void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
bool feeds (boost::shared_ptr<Route> other) const;
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
return mixbufs;
}
+ void set_can_pan (bool yn);
+
private:
BufferSet mixbufs;
boost::shared_ptr<Route> _send_to;
/* special processors */
- boost::shared_ptr<Delivery> monitor_send() const { return _monitor_send; }
+ boost::shared_ptr<InternalSend> monitor_send() const { return _monitor_send; }
boost::shared_ptr<Delivery> main_outs() const { return _main_outs; }
boost::shared_ptr<InternalReturn> internal_return() const { return _intreturn; }
boost::shared_ptr<MonitorProcessor> monitor_control() const { return _monitor_control; }
ProcessorList _processors;
mutable Glib::RWLock _processor_lock;
boost::shared_ptr<Delivery> _main_outs;
- boost::shared_ptr<Delivery> _monitor_send;
+ boost::shared_ptr<InternalSend> _monitor_send;
boost::shared_ptr<InternalReturn> _intreturn;
boost::shared_ptr<MonitorProcessor> _monitor_control;
boost::shared_ptr<Pannable> _pannable;
void
Delivery::reset_panner ()
{
- if (_role == Listen) {
- /* monitor out gets no panner */
- return;
- }
-
if (panners_legal) {
if (!no_panner_reset) {
return boost::shared_ptr<Panner>();
}
}
+
compute_peak = x86_sse_compute_peak;
find_peaks = x86_sse_find_peaks;
apply_gain_to_buffer = x86_sse_apply_gain_to_buffer;
- mix_buffers_with_gain = x86_sse_mix_buffers_with_gain;
+ // mix_buffers_with_gain = x86_sse_mix_buffers_with_gain;
+ mix_buffers_with_gain = default_mix_buffers_with_gain;
mix_buffers_no_gain = x86_sse_mix_buffers_no_gain;
generic_mix_functions = false;
#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"
// 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 */
_amp->run (mixbufs, start_frame, end_frame, nframes, true);
- /* XXX NEED TO PAN */
-
/* consider metering */
if (_metering) {
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 ();
+ }
+}
new_processors.insert (amp, _monitor_send);
break;
}
+ _monitor_send->set_can_pan (false);
break;
case AfterFaderListen:
switch (Config->get_afl_position ()) {
new_processors.insert (new_processors.end(), _monitor_send);
break;
}
+ _monitor_send->set_can_pan (true);
break;
}
} else {
new_processors.insert (new_processors.end(), _monitor_send);
+ _monitor_send->set_can_pan (false);
}
}
#include "ardour/runtime_functions.h"
#include "ardour/session.h"
#include "ardour/utils.h"
+#include "ardour/mix.h"
#include "panner_2in2out.h"
if (pan != 0.0f) {
/* pan is 1 but also not 0, so we must do it "properly" */
-
+
+ //obufs.get_audio(1).read_from (srcbuf, nframes);
mix_buffers_with_gain(dst,src,nframes,pan);
/* mark that we wrote into the buffer */
/* pan is not 1 but also not 0, so we must do it "properly" */
mix_buffers_with_gain(dst,src,nframes,pan);
-
+ // obufs.get_audio(1).read_from (srcbuf, nframes);
+
/* XXX it would be nice to mark the buffer as written to */
}