Mercurial > hg > qm-dsp
diff dsp/onsets/DetectionFunction.h @ 499:af5b7ef02aa7
Style fixes: avoid unsigned, fix formatting
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Mon, 03 Jun 2019 14:20:39 +0100 |
parents | 701233f8ed41 |
children |
line wrap: on
line diff
--- a/dsp/onsets/DetectionFunction.h Mon Jun 03 14:20:07 2019 +0100 +++ b/dsp/onsets/DetectionFunction.h Mon Jun 03 14:20:39 2019 +0100 @@ -28,8 +28,8 @@ #define DF_BROADBAND (5) struct DFConfig{ - unsigned int stepSize; // DF step in samples - unsigned int frameLength; // DF analysis window - usually 2*step. Must be even! + int stepSize; // DF step in samples + int frameLength; // DF analysis window - usually 2*step. Must be even! int DFType; // type of detection function ( see defines ) double dbRise; // only used for broadband df (and required for it) bool adaptiveWhitening; // perform adaptive whitening @@ -41,7 +41,7 @@ { public: double* getSpectrumMagnitude(); - DetectionFunction( DFConfig Config ); + DetectionFunction( DFConfig config ); virtual ~DetectionFunction(); /** @@ -60,20 +60,20 @@ void whiten(); double runDF(); - double HFC( unsigned int length, double* src); - double specDiff( unsigned int length, double* src); - double phaseDev(unsigned int length, double *srcPhase); - double complexSD(unsigned int length, double *srcMagnitude, double *srcPhase); - double broadband(unsigned int length, double *srcMagnitude); + double HFC(int length, double* src); + double specDiff(int length, double* src); + double phaseDev(int length, double *srcPhase); + double complexSD(int length, double *srcMagnitude, double *srcPhase); + double broadband(int length, double *srcMagnitude); private: void initialise( DFConfig Config ); void deInitialise(); int m_DFType; - unsigned int m_dataLength; - unsigned int m_halfLength; - unsigned int m_stepSize; + int m_dataLength; + int m_halfLength; + int m_stepSize; double m_dbRise; bool m_whiten; double m_whitenRelaxCoeff;