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

Function hamming

KeyboardVisualizerCommon/chuck_fft.c:43–56  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

41// desc: make window
42//-----------------------------------------------------------------------------
43void hamming(float * window, unsigned long length)
44{
45 unsigned long i;
46 double pi, phase = 0, delta;
47
48 pi = 4.*atan(1.0);
49 delta = 2 * pi / (double)length;
50
51 for (i = 0; i < length; i++)
52 {
53 window[i] = (float)(0.54 - .46*cos(phase));
54 phase += delta;
55 }
56}
57
58
59

Callers 1

InitializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected