Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tartini: server crash when n < blockSize * 4 #307

Open
elgiano opened this issue Jan 17, 2021 · 0 comments
Open

Tartini: server crash when n < blockSize * 4 #307

elgiano opened this issue Jan 17, 2021 · 0 comments

Comments

@elgiano
Copy link

elgiano commented Jan 17, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant