Mercurial > hg > qm-dsp
comparison base/SincWindow.h @ 483:fdaa63607c15
Untabify, indent, tidy
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 31 May 2019 11:54:32 +0100 |
parents | 59b151f13b3e |
children | 701233f8ed41 |
comparison
equal
deleted
inserted
replaced
482:cbe668c7d724 | 483:fdaa63607c15 |
---|---|
31 * peak) is p samples. | 31 * peak) is p samples. |
32 */ | 32 */ |
33 SincWindow(int length, double p) : m_length(length), m_p(p) { init(); } | 33 SincWindow(int length, double p) : m_length(length), m_p(p) { init(); } |
34 | 34 |
35 int getLength() const { | 35 int getLength() const { |
36 return m_length; | 36 return m_length; |
37 } | 37 } |
38 | 38 |
39 const double *getWindow() const { | 39 const double *getWindow() const { |
40 return m_window.data(); | 40 return m_window.data(); |
41 } | 41 } |
42 | 42 |
43 void cut(double *src) const { | 43 void cut(double *src) const { |
44 cut(src, src); | 44 cut(src, src); |
45 } | 45 } |
46 | 46 |
47 void cut(const double *src, double *dst) const { | 47 void cut(const double *src, double *dst) const { |
48 for (int i = 0; i < m_length; ++i) { | 48 for (int i = 0; i < m_length; ++i) { |
49 dst[i] = src[i] * m_window[i]; | 49 dst[i] = src[i] * m_window[i]; |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 int m_length; | 54 int m_length; |
55 double m_p; | 55 double m_p; |