13
0

Fix un/bypassing Aux-send panners

This fixes issues with send-panner bypass whenever the
target bus input-count is different from the send's channel count.

--

Previously, when the aux-send panner was bypassed, data was
copied using BufferSet::read_from().
This sets the channel count of the output buffer set (here: mixbufs)
to match the input (here: bufs).

e.g. mono to stereo, "1 in -> 2 out" out was changed to "1 in -> 1 out".

Un-bypassing the panner later does not reconfigure the I/O.
Mixbufs remained mono, and PannerShell::run() "1 in -> 1 out"
does nothing. The panner was effectively not functional.
This commit is contained in:
Robin Gareus 2020-03-12 02:23:49 +01:00
parent 33f85b094b
commit 5b113c9c5b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -226,7 +226,21 @@ InternalSend::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sa
} else {
/* no panner or panner is bypassed */
assert (mixbufs.available () >= bufs.count ());
mixbufs.read_from (bufs, nframes);
/* BufferSet::read_from() changes the channel-conut,
* so we manually copy bufs -> mixbufs
*/
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
/* iterate over outputs */
BufferSet::iterator i = bufs.begin (*t);
for (BufferSet::iterator o = mixbufs.begin (*t); o != mixbufs.end (*t); ++o) {
if (i == bufs.end (*t)) {
o->silence (nframes, 0);
} else {
o->read_from (*i, nframes);
++i;
}
}
}
}
/* main gain control: * mute & bypass/enable */