Mercurial > hg > aimc
comparison src/Modules/Output/Graphics/Scale/ScaleERB.h @ 117:c5ac2f0c7fc5
- All \t to two spaces (style guide compliance)
author | tomwalters |
---|---|
date | Fri, 15 Oct 2010 05:46:53 +0000 |
parents | 47b009f2c936 |
children | 9d880fb93c39 |
comparison
equal
deleted
inserted
replaced
116:47b009f2c936 | 117:c5ac2f0c7fc5 |
---|---|
26 * - J. Smith and J. Abel (1999), "Bark and ERB bilinear transforms" | 26 * - J. Smith and J. Abel (1999), "Bark and ERB bilinear transforms" |
27 * http://www-ccrma.stanford.edu/~jos/bbt/ | 27 * http://www-ccrma.stanford.edu/~jos/bbt/ |
28 */ | 28 */ |
29 class ScaleERB : public Scale { | 29 class ScaleERB : public Scale { |
30 public: | 30 public: |
31 ScaleERB(unsigned int min, unsigned int max, float density) | 31 ScaleERB(unsigned int min, unsigned int max, float density) |
32 : Scale(min, max, density) { m_iType = SCALE_ERB; m_sName = "erb"; }; | 32 : Scale(min, max, density) { m_iType = SCALE_ERB; m_sName = "erb"; }; |
33 | 33 |
34 float FromLinear(float fFreq) { | 34 float FromLinear(float fFreq) { |
35 return 21.4f*log10(0.00437f*fFreq + 1.0f); | 35 return 21.4f*log10(0.00437f*fFreq + 1.0f); |
36 }; | 36 }; |
37 | 37 |
38 float ToLinear(float fFreq) { | 38 float ToLinear(float fFreq) { |
39 return (pow(10, fFreq/21.4f) - 1.0f)/0.00437f; | 39 return (pow(10, fFreq/21.4f) - 1.0f)/0.00437f; |
40 }; | 40 }; |
41 }; | 41 }; |
42 | 42 |
43 #endif /* __MODULE_SCALE_ERB_H__ */ | 43 #endif /* __MODULE_SCALE_ERB_H__ */ |