You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the analyze_fft256 library some code seems to be missing to make this library work also with audio_block_samples of 64. The outputflag is NOT set and thus the routine never reports "available".
Steps To Reproduce Problem
Change #define AUDIO_BLOCK_SAMPLES to 64 in audioStream.h
Any program that uses an AudioAnalyzeFFT256 will never get an FFT.available() report as the routine never sets the outputflag to TRUE.
Proposed changes
Minor changes are necessary in analyze_FFT256.cpp library to solve this:
line114 count = 2; <<<<<<<<<<<<<<<<< THIS SHOULD BE ZERO !!
const uint32_t *p = (uint32_t *)buffer;
for (int i=0; i < 128; i++) {
uint32_t tmp = *p++;
int16_t v1 = tmp & 0xFFFF;
int16_t v2 = tmp >> 16;
output[i] = sqrt_uint32_approx(v1 * v1 + v2 * v2);
}
outputflag=true; <<<<<<<<<<<<<<<<< THIS NEEDS TO BE ADDED
The text was updated successfully, but these errors were encountered:
Additionally line 109 of analyzeFFT256.cpp also has a mistake.
This now reads: copy_to_fft_buffer(buffer+256, prevblocks[1]->data);
but it should be copy_to_fft_buffer(buffer+256, prevblocks[0]->data);
Description
In the analyze_fft256 library some code seems to be missing to make this library work also with audio_block_samples of 64. The outputflag is NOT set and thus the routine never reports "available".
Steps To Reproduce Problem
Change #define AUDIO_BLOCK_SAMPLES to 64 in audioStream.h
Any program that uses an AudioAnalyzeFFT256 will never get an FFT.available() report as the routine never sets the outputflag to TRUE.
Proposed changes
Minor changes are necessary in analyze_FFT256.cpp library to solve this:
line114 count = 2; <<<<<<<<<<<<<<<<< THIS SHOULD BE ZERO !!
const uint32_t *p = (uint32_t *)buffer;
for (int i=0; i < 128; i++) {
uint32_t tmp = *p++;
int16_t v1 = tmp & 0xFFFF;
int16_t v2 = tmp >> 16;
output[i] = sqrt_uint32_approx(v1 * v1 + v2 * v2);
}
outputflag=true; <<<<<<<<<<<<<<<<< THIS NEEDS TO BE ADDED
The text was updated successfully, but these errors were encountered: