MCPcopy Create free account
hub / github.com/LabSound/LabSound / fftCosInit

Function fftCosInit

src/core/_SoundPipe_FFT.cpp:499–514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497*****************************************************/
498
499static void fftCosInit(int M, SPFLOAT * Utbl)
500{
501 /* Compute Utbl, the cosine table for ffts */
502 /* of size (pow(2,M)/4 +1) */
503 /* INPUTS */
504 /* M = log2 of fft size */
505 /* OUTPUTS */
506 /* *Utbl = cosine table */
507 unsigned int fftN = POW2(M);
508 unsigned int i1;
509
510 Utbl[0] = 1.0;
511 for (i1 = 1; i1 < fftN / 4; i1++)
512 Utbl[i1] = cos((2.0 * M_PI * (SPFLOAT) i1) / (SPFLOAT) fftN);
513 Utbl[fftN / 4] = 0.0;
514}
515
516void fftBRInit(int M, int16_t * BRLow)
517{

Callers 1

sp_fft_initFunction · 0.85

Calls 1

POW2Function · 0.85

Tested by

no test coverage detected