4 #include <libraries/Fft/Fft.h>
21 hann[i] = 0.5f*(1.0-cosf(phase));
44 mic1_copy[i] = mic1.at(i)*hann.at(i);
45 mic2_copy[i] = mic2.at(i)*hann.at(i);
47 std::fill(mic1_copy.begin()+
BLOCKSIZE,mic1_copy.end(), 0);
48 std::fill(mic2_copy.begin()+
BLOCKSIZE,mic2_copy.end(), 0);
68 re_conv.at(i) = fft1->fdr(i)*fft2->fdr(i) - fft1->fdi(i)*fft2->fdi(i);
71 im_conv.at(i) = fft1->fdi(i)*fft2->fdr(i) + fft1->fdr(i)*fft2->fdi(i);
78 ifft->ifft(re_conv, im_conv);
85 float curval = ifft->td(i);
87 float abscurval = fabsf_neon(curval);
89 if(abscurval > max_val) {
107 return 1000*float(arg)/fs;