Make const
This commit is contained in:
@@ -58,11 +58,11 @@ void FHT::makeCasTable(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void FHT::scale(float *p, float d) {
|
||||
void FHT::scale(float *p, float d) const {
|
||||
for (int i = 0; i < (num_ / 2); i++) *p++ *= d;
|
||||
}
|
||||
|
||||
void FHT::ewma(float *d, float *s, float w) {
|
||||
void FHT::ewma(float *d, float *s, float w) const {
|
||||
for (int i = 0; i < (num_ / 2); i++, d++, s++) *d = *d * w + *s * (1 - w);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class FHT {
|
||||
~FHT();
|
||||
int sizeExp() const;
|
||||
int size() const;
|
||||
void scale(float*, float);
|
||||
void scale(float*, float) const;
|
||||
|
||||
/**
|
||||
* Exponentially Weighted Moving Average (EWMA) filter.
|
||||
@@ -76,7 +76,7 @@ class FHT {
|
||||
* @param s is fresh input.
|
||||
* @param w is the weighting factor.
|
||||
*/
|
||||
void ewma(float *d, float *s, float w);
|
||||
void ewma(float *d, float *s, float w) const;
|
||||
|
||||
/**
|
||||
* Logarithmic audio spectrum. Maps semi-logarithmic spectrum
|
||||
|
||||
Reference in New Issue
Block a user