this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix???? VQT/FQT desync test

alice 2c639b85 823e3273

+7 -4
+2 -1
src/ext/fft.c
··· 335 335 #else 336 336 337 337 kiss_fft_cpx out[FFT_SIZE + 1]; 338 - kiss_fftr(fftcfg, sampleBuf, out); 338 + // Use the newest samples for FFT (they're at the end of the buffer) 339 + kiss_fftr(fftcfg, sampleBuf + AUDIO_BUFFER_SIZE - (FFT_SIZE * 2), out); 339 340 340 341 float peakValue = fPeakMinValue; 341 342 for (int i = 0; i < FFT_SIZE; i++)
+5 -3
src/ext/vqt.c
··· 263 263 // Copy audio data from the shared buffer 264 264 // sampleBuf is defined in fft.c as extern 265 265 extern float sampleBuf[]; 266 - memcpy(vqtAudioBuffer, sampleBuf, VQT_FFT_SIZE * sizeof(float)); 266 + // Use the newest samples for VQT (they're at the end of the buffer) 267 + #define AUDIO_BUFFER_SIZE (VQT_FFT_SIZE > (FFT_SIZE * 2) ? VQT_FFT_SIZE : (FFT_SIZE * 2)) 268 + memcpy(vqtAudioBuffer, sampleBuf + AUDIO_BUFFER_SIZE - VQT_FFT_SIZE, VQT_FFT_SIZE * sizeof(float)); 267 269 268 270 // Check if we have any audio data 269 271 float audioSum = 0.0f; ··· 317 319 // Print profiling info every 60 frames (~1 second) 318 320 if (profileCount % 60 == 0) 319 321 { 320 - printf("VQT Performance (16K FFT):\n"); 322 + printf("VQT Performance (8K FFT):\n"); 321 323 printf(" FFT avg: %.3fms\n", totalFftTime / profileCount); 322 324 printf(" Kernels avg: %.3fms\n", totalKernelTime / profileCount); 323 325 printf(" Total avg: %.3fms\n", (totalFftTime + totalKernelTime) / profileCount); ··· 475 477 double tic_api_vqtr(tic_mem* memory, s32 bin) { return 0.0; } 476 478 double tic_api_vqtrs(tic_mem* memory, s32 bin) { return 0.0; } 477 479 478 - #endif // TIC80_FFT_UNSUPPORTED 480 + #endif // TIC80_FFT_UNSUPPORTED