mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-07 15:22:34 +02:00
29 lines
702 B
C
29 lines
702 B
C
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
Spectrum.h
|
|
|
|
Dominic Mazzoni
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef __AUDACITY_SPECTRUM__
|
|
#define __AUDACITY_SPECTRUM__
|
|
|
|
#include "FFT.h"
|
|
|
|
/*
|
|
This function computes the power (mean square amplitude) as
|
|
a function of frequency, for some block of audio data.
|
|
|
|
width: the number of samples
|
|
calculates windowSize/2 frequency samples
|
|
*/
|
|
|
|
bool ComputeSpectrum(const float * data, size_t width, size_t windowSize,
|
|
double rate, float *out, bool autocorrelation,
|
|
int windowFunc = eWinFuncHanning);
|
|
|
|
#endif
|