File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ class WindowFunction {
31
31
this ->i_half_samples = samples / 2 - 1 ;
32
32
}
33
33
34
+ // / Provides the multipication factor at the indicated position. The result is symetirically mirrored around the center
34
35
inline float factor (int idx) {
35
36
float result = idx < i_half_samples ? factor_internal (idx) : factor_internal (i_samples-idx-1 );
36
37
return result>1 .0f ? 1 .0f : result;
37
38
}
38
39
40
+ // / Provides the number of samples (fft length)
39
41
inline int samples () { return i_samples; }
40
42
41
43
protected:
@@ -49,6 +51,7 @@ class WindowFunction {
49
51
// virtual function provide implementation in subclass
50
52
virtual float factor_internal (int idx) = 0;
51
53
54
+ // the ratio idx / samples -1
52
55
inline float ratio (int idx) {
53
56
return (static_cast <float >(idx)) / samples_minus_1;
54
57
}
You can’t perform that action at this time.
0 commit comments