sc3-plugins
sc3-plugins copied to clipboard
Tartini: server crash when n < blockSize * 4
Tartini crashes when destroyed, if n < blockSize * 4 Reproducer:
s.options.blockSize = 256;
s.waitForBoot {
x = {Tartini.kr(SinOsc.ar, 0.93, 512)}.play;
s.sync;
x.free; // Server crashes when x is freed.
}
A possible clue? Tartini.cpp line 153
if (overlap>(n-(4*unit->blocklenghth))) overlap=(n-(4*unit->blocklength));
This creates a negative overlap if n < 4 * blockSize.
I leave this issue here as a reminder, I haven't looked deeper into that, I found this out while working on a Bela, but it's reproducible on Linux as well. I don't know if I'm doing something silly, I will have to look more into this when I have time. For now I moved on by using n = 1024 with blockSize 256, and it works without problems.