Seems right to me! Go ahead and make the pull request.
~Jack

On Wed, Jul 15, 2020 at 10:47 PM Curtis Ullerich <curtullerich@gmail.com> wrote:
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 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
_______________________________________________
chuck-dev mailing list
chuck-dev@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev