Mercurial > hg > aimc
comparison src/Modules/Output/Graphics/Scale/ScaleLogScaled.h @ 228:82e0dc3dfd16
- All \t to two spaces (style guide compliance)
author | tomwalters |
---|---|
date | Fri, 15 Oct 2010 05:46:53 +0000 |
parents | 73c6d61440ad |
children | 2aa72aa8a0d4 |
comparison
equal
deleted
inserted
replaced
227:73c6d61440ad | 228:82e0dc3dfd16 |
---|---|
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 ScaleLogScaled : public Scale { | 29 class ScaleLogScaled : public Scale { |
30 public: | 30 public: |
31 ScaleLogScaled(unsigned int min, unsigned int max, float density) | 31 ScaleLogScaled(unsigned int min, unsigned int max, float density) |
32 : Scale(min, max, density) { m_iType = SCALE_ERB; m_sName = "logscaled"; }; | 32 : Scale(min, max, density) { m_iType = SCALE_ERB; m_sName = "logscaled"; }; |
33 | 33 |
34 float FromLinear(float fFreq) { | 34 float FromLinear(float fFreq) { |
35 return 21.4f*log10(0.00437f*fFreq); | 35 return 21.4f*log10(0.00437f*fFreq); |
36 }; | 36 }; |
37 | 37 |
38 float ToLinear(float fFreq) { | 38 float ToLinear(float fFreq) { |
39 return (pow(10, fFreq/21.4f))/0.00437f; | 39 return (pow(10, fFreq/21.4f))/0.00437f; |
40 }; | 40 }; |
41 }; | 41 }; |
42 | 42 |
43 #endif /* __MODULE_SCALE_ERB_H__ */ | 43 #endif /* __MODULE_SCALE_ERB_H__ */ |