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
This commit is contained in:
parent
a5674e9271
commit
1961051416
|
@ -74,7 +74,7 @@ public:
|
|||
|
||||
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 ();
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ class InternalSend : public Send
|
|||
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;
|
||||
|
@ -52,6 +53,8 @@ class InternalSend : public Send
|
|||
return mixbufs;
|
||||
}
|
||||
|
||||
void set_can_pan (bool yn);
|
||||
|
||||
private:
|
||||
BufferSet mixbufs;
|
||||
boost::shared_ptr<Route> _send_to;
|
||||
|
|
|
@ -215,7 +215,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
|||
|
||||
/* 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; }
|
||||
|
@ -438,7 +438,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
|||
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;
|
||||
|
|
|
@ -393,11 +393,6 @@ Delivery::unpan ()
|
|||
void
|
||||
Delivery::reset_panner ()
|
||||
{
|
||||
if (_role == Listen) {
|
||||
/* monitor out gets no panner */
|
||||
return;
|
||||
}
|
||||
|
||||
if (panners_legal) {
|
||||
if (!no_panner_reset) {
|
||||
|
||||
|
@ -606,3 +601,4 @@ Delivery::panner () const
|
|||
return boost::shared_ptr<Panner>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,8 @@ setup_hardware_optimization (bool try_optimization)
|
|||
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;
|
||||
|
|
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3780,6 +3780,7 @@ Route::setup_invisible_processors ()
|
|||
new_processors.insert (amp, _monitor_send);
|
||||
break;
|
||||
}
|
||||
_monitor_send->set_can_pan (false);
|
||||
break;
|
||||
case AfterFaderListen:
|
||||
switch (Config->get_afl_position ()) {
|
||||
|
@ -3790,10 +3791,12 @@ Route::setup_invisible_processors ()
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "ardour/runtime_functions.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/utils.h"
|
||||
#include "ardour/mix.h"
|
||||
|
||||
#include "panner_2in2out.h"
|
||||
|
||||
|
@ -269,7 +270,8 @@ Panner2in2out::distribute_one (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gai
|
|||
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 */
|
||||
|
@ -328,7 +330,8 @@ Panner2in2out::distribute_one (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gai
|
|||
/* 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 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue