Fix forwarding of output-buffers.
authorRobin Gareus <robin@gareus.org>
Fri, 25 Nov 2016 12:26:38 +0000 (13:26 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 25 Nov 2016 12:26:38 +0000 (13:26 +0100)
fbc8504f9eb74 swapped the iterators: Instead of iterating over output
buffers like BufferSet::read_from(), the new code iterates over
the current buffers. In case of 1 in -> 2 out, only the 1st channel
was be copied.  Also unlike BufferSet::read_from() the ChanCount was
not updated.

Processors after a Delivery e.g. out-meter, AFL processor did not see
all channels.

libs/ardour/delivery.cc

index 569def966930c568fb0e09cdd036c47dc04363af..d95e32a02f4132869a717d3fadfc2623d9cec692 100644 (file)
@@ -326,13 +326,13 @@ Delivery::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, do
        }
 
        if (result_required) {
-
                /* "bufs" are internal, meaning they should never reflect
                   split-cycle offsets. So shift events back in time from where
                   they were for the external buffers associated with Ports.
                */
 
-               BufferSet& outs (output_buffers());
+               const BufferSet& outs (output_buffers());
+               bufs.set_count (output_buffers().count ());
 
                for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {