Hi ChucK devs,
I've been digging into UAnae and having trouble getting AutoCorr/XCorr to
work.
I get an assertion failure when running a minimal example:
SinOsc s => FFT fft =^ AutoCorr cor => blackhole;
1024 => fft.size;
440 => s.freq;
while(true) {
cor.upchuck();
20::ms => now;
}
...
chuck: uana_extract.cpp:1381: void xcorr_fft(float*, long int, float*, long
int, float*, long int): Assertion `fsize == gsize == size' failed.
The assertion
<https://github.com/ccrma/chuck/blob/6217b3b08c3b8bb561730fb112d1b3a204cd183…>
seems
to be buggy. Currently it is:
assert( fsize == gsize == size );
Unless size is supposed to always be 0 or 1, this will never pass. I think
this is what was intended:
assert( fsize == gsize && gsize == size );
When I make that change and build with make linux-jack, my example runs.
Am I understanding the intent correctly? If so I can send a pull request
with the fix.
Thanks,
Curtis