Fix stretching mono files on multi-channel trigger slots

Like in the non-stretch case `chn % data.size ()` is used.
This commit is contained in:
Robin Gareus
2025-04-03 21:01:45 +02:00
parent 8dd89616e1
commit 4f8a6e8e80

View File

@@ -2178,10 +2178,10 @@ AudioTrigger::audio_run (BufferSet& bufs, samplepos_t start_sample, samplepos_t
* the end of the region
*/
std::vector<Sample*> in(nchans);
float** in = (float**)alloca(nchans * sizeof (float*));
for (uint32_t chn = 0; chn < nchans; ++chn) {
in[chn] = data[chn] + read_index;
in[chn] = data[chn % data.size ()] + read_index;
}
/* Note: RubberBandStretcher's process() and retrieve() API's accepts Sample**