1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-16 08:34:10 +02:00
audacity/src/import/SpecPowerMeter.h
Paul Licameli f52dfd3ac3 New library for math...
... note the swap of target_link_libraries lines in src/CMakeLists.txt,
needed to build at least on macOS, becuase FFT.h must be looked up first in
lib-math, not in lib-src/twolame

Also making a dependency cycle of SampleFormat and Dither!  But we will tolerate
that within one small library.
2021-07-22 16:54:00 -04:00

36 lines
701 B
C++

/**********************************************************************
Audacity: A Digital Audio Editor
SpecPowerMeter.h
Philipp Sibler
**********************************************************************/
#ifndef __AUDACITY_SPECPOWERMETER_H_
#define __AUDACITY_SPECPOWERMETER_H_
#include <cstddef>
#include "SampleFormat.h"
class SpecPowerCalculation
{
const size_t mSigLen;
Floats mSigI;
Floats mSigFR;
Floats mSigFI;
float CalcBinPower(float* sig_f_r, float* sig_f_i, int loBin, int hiBin);
int Freq2Bin(float fc);
public:
SpecPowerCalculation(size_t sigLen);
~SpecPowerCalculation();
float CalcPower(float* sig, float fc, float bw);
};
#endif