13
0

Verify Freeze/Export/Bounce polarity invert buffers

When using bounce w/process, the initial bufferset can [wrongly] be
  buffers.set_count (track.max_processor_streams())
Since the polarity-processor is first in the chain, iterations
over all buffer that don't have a matching _current_gain[]
or _control[] leads to memory-corruption or segfault.
This commit is contained in:
Robin Gareus 2019-04-07 19:30:23 +02:00
parent 1557ea5314
commit 7450d69189
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -56,7 +56,8 @@ PolarityProcessor::configure_io (ChanCount in, ChanCount out)
void
PolarityProcessor::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t nframes, bool)
{
int chn = 0;
size_t chn = 0;
assert (bufs.count().n_audio () <= _current_gain.size());
if (!_active && !_pending_active) {
/* fade all to unity */
for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i, ++chn) {