1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-08 04:32:00 +01:00

Performance improvements for track spectrum display and PCM

import submitted by Sami Liedes.
This commit is contained in:
BusinessmanProgrammerSteve
2010-09-13 01:31:54 +00:00
parent 1d6e1593ee
commit c0b5fb01da
6 changed files with 101 additions and 67 deletions

View File

@@ -27,7 +27,7 @@ static inline float todB_a(const float *x){
#else
static inline float todB_a(const float *x){
return (*(x)==0?-400.f:log(*(x)**(x))*4.34294480f);
return (*(x)==0?-400.f:logf(*(x)**(x))*4.34294480f);
}
#endif
@@ -78,7 +78,7 @@ bool ComputeSpectrum(float * data, int width,
// of the power, instead of the square root
for (i = 0; i < windowSize; i++)
in[i] = pow(in[i], 1.0f / 3.0f);
in[i] = powf(in[i], 1.0f / 3.0f);
// Take FFT
#ifdef EXPERIMENTAL_USE_REALFFTF