15 #ifndef QM_DSP_WINDOW_H 16 #define QM_DSP_WINDOW_H 53 if (&w ==
this)
return *
this;
61 void cut(T *src)
const {
cut(src, src); }
62 void cut(
const T *src, T *dst)
const {
63 for (
int i = 0; i <
m_size; ++i) {
73 for (
int i = 0; i <
m_size; ++i) {
93 for (i = 0; i < n; ++i) mult[i] = 1.0;
98 for (i = 0; i < n; ++i) {
99 mult[i] = mult[i] * 0.5;
105 mult[0] = mult[1] = 0;
108 mult[1] = mult[2] = 2./3.;
110 for (i = 0; i < n/2; ++i) {
111 mult[i] = mult[i] * (i / T(n/2));
112 mult[i + n - n/2] = mult[i + n - n/2] * (1.0 - (i / T(n/2)));
119 for (i = 0; i < n; ++i) {
120 mult[i] = mult[i] * (0.54 - 0.46 * cos(2 * M_PI * i / n));
127 for (i = 0; i < n; ++i) {
128 mult[i] = mult[i] * (0.50 - 0.50 * cos(2 * M_PI * i / n));
135 for (i = 0; i < n; ++i) {
136 mult[i] = mult[i] * (0.42 - 0.50 * cos(2 * M_PI * i / n)
137 + 0.08 * cos(4 * M_PI * i / n));
144 for (i = 0; i < n; ++i) {
145 mult[i] = mult[i] * (0.35875
146 - 0.48829 * cos(2 * M_PI * i / n)
147 + 0.14128 * cos(4 * M_PI * i / n)
148 - 0.01168 * cos(6 * M_PI * i / n));
std::vector< T > getWindowData() const
void cut(const T *src, T *dst) const
Various shaped windows for sample frame conditioning, including cosine windows (Hann etc) and triangu...
WindowType getType() const
Window & operator=(const Window &w)
Window(WindowType type, int size)
Construct a windower of the given type and size.