Skip to content

Commit a4bd970

Browse files
committed
Coments
1 parent 47799b7 commit a4bd970

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AudioLibs/FFT/FFTWindows.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ class WindowFunction {
3131
this->i_half_samples = samples / 2 - 1;
3232
}
3333

34+
/// Provides the multipication factor at the indicated position. The result is symetirically mirrored around the center
3435
inline float factor(int idx) {
3536
float result = idx < i_half_samples ? factor_internal(idx) : factor_internal(i_samples-idx-1);
3637
return result>1.0f ? 1.0f : result;
3738
}
3839

40+
/// Provides the number of samples (fft length)
3941
inline int samples() { return i_samples; }
4042

4143
protected:
@@ -49,6 +51,7 @@ class WindowFunction {
4951
// virtual function provide implementation in subclass
5052
virtual float factor_internal(int idx) = 0;
5153

54+
// the ratio idx / samples -1
5255
inline float ratio(int idx) {
5356
return (static_cast<float>(idx)) / samples_minus_1;
5457
}

0 commit comments

Comments
 (0)