diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-18 20:03:49 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-18 20:03:49 +0000 |
commit | 47aa8ed09ba7a2749acf69a0146acac4c2e813f5 (patch) | |
tree | 37a7b0c9a9169e69563dadc04ac03dc95105d7d8 /libs/ardour/internal_send.cc | |
parent | 6370400953ac172f85cfc36a60838985d4387d1b (diff) |
improved fix for #4158 etc, hopefully
git-svn-id: svn://localhost/ardour2/branches/3.0@9896 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/internal_send.cc')
-rw-r--r-- | libs/ardour/internal_send.cc | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 171a5bb210..7fe52ec617 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -22,6 +22,7 @@ #include "ardour/amp.h" #include "ardour/audio_buffer.h" +#include "ardour/internal_return.h" #include "ardour/internal_send.h" #include "ardour/meter.h" #include "ardour/panner.h" @@ -77,6 +78,9 @@ InternalSend::use_target (boost::shared_ptr<Route> sendto) _send_to->add_send_to_internal_return (this); + mixbufs.ensure_buffers (_send_to->internal_return()->input_streams(), _session.get_block_size()); + mixbufs.set_count (_send_to->internal_return()->input_streams()); + set_name (sendto->name()); _send_to_id = _send_to->id(); @@ -110,7 +114,6 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame assert(mixbufs.available() >= bufs.count()); if (_panshell && !_panshell->bypassed()) { - mixbufs.set_count (_send_to->n_outputs ()); _panshell->run (bufs, mixbufs, start_frame, end_frame, nframes); } else { mixbufs.read_from (bufs, nframes); @@ -158,20 +161,6 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame } } -#if 0 - if (_session.transport_rolling()) { - for (BufferSet::audio_iterator b = mixbufs.audio_begin(); b != mixbufs.audio_end(); ++b) { - Sample* p = b->data (); - for (pframes_t n = 0; n < nframes; ++n) { - if (p[n] != 0.0) { - cerr << "\tnon-zero data SENT to " << b->data() << endl; - break; - } - } - } - } -#endif - /* target will pick up our output when it is ready */ out: @@ -181,7 +170,10 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame int InternalSend::set_block_size (pframes_t nframes) { - mixbufs.ensure_buffers (_configured_input, nframes); + if (_send_to) { + mixbufs.ensure_buffers (_send_to->internal_return()->input_streams(), nframes); + } + return 0; } |