MCPcopy Create free account
hub / github.com/CalcProgrammer1/KeyboardVisualizer / blackman

Function blackman

KeyboardVisualizerCommon/chuck_fft.c:64–77  ·  view source on GitHub ↗

----------------------------------------------------------------------------- name: blackman() desc: make window -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

62// desc: make window
63//-----------------------------------------------------------------------------
64void blackman(float * window, unsigned long length)
65{
66 unsigned long i;
67 double pi, phase = 0, delta;
68
69 pi = 4.*atan(1.0);
70 delta = 2 * pi / (double)length;
71
72 for (i = 0; i < length; i++)
73 {
74 window[i] = (float)(0.42 - .5*cos(phase) + .08*cos(2 * phase));
75 phase += delta;
76 }
77}
78
79
80

Callers 1

InitializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected