1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00

Fixed tab indentations to spaces.

This commit is contained in:
james.k.crook@gmail.com 2013-10-02 16:00:34 +00:00
parent d7286f53e3
commit 55384ff5e0
3 changed files with 52 additions and 52 deletions

View File

@ -4,25 +4,25 @@
void Biquad_Process (BiquadStruct* pBQ, int iNumSamples) void Biquad_Process (BiquadStruct* pBQ, int iNumSamples)
{ {
float* pfIn = pBQ->pfIn; float* pfIn = pBQ->pfIn;
float* pfOut = pBQ->pfOut; float* pfOut = pBQ->pfOut;
float fPrevIn = pBQ->fPrevIn; float fPrevIn = pBQ->fPrevIn;
float fPrevPrevIn = pBQ->fPrevPrevIn; float fPrevPrevIn = pBQ->fPrevPrevIn;
float fPrevOut = pBQ->fPrevOut; float fPrevOut = pBQ->fPrevOut;
float fPrevPrevOut = pBQ->fPrevPrevOut; float fPrevPrevOut = pBQ->fPrevPrevOut;
for (int i = 0; i < iNumSamples; i++) for (int i = 0; i < iNumSamples; i++)
{ {
float fIn = *pfIn++; float fIn = *pfIn++;
*pfOut = fIn * pBQ->fNumerCoeffs [0] + *pfOut = fIn * pBQ->fNumerCoeffs [0] +
fPrevIn * pBQ->fNumerCoeffs [1] + fPrevIn * pBQ->fNumerCoeffs [1] +
fPrevPrevIn * pBQ->fNumerCoeffs [2] - fPrevPrevIn * pBQ->fNumerCoeffs [2] -
fPrevOut * pBQ->fDenomCoeffs [0] - fPrevOut * pBQ->fDenomCoeffs [0] -
fPrevPrevOut * pBQ->fDenomCoeffs [1]; fPrevPrevOut * pBQ->fDenomCoeffs [1];
fPrevPrevIn = fPrevIn; fPrevPrevIn = fPrevIn;
fPrevIn = fIn; fPrevIn = fIn;
fPrevPrevOut = fPrevOut; fPrevPrevOut = fPrevOut;
fPrevOut = *pfOut++; fPrevOut = *pfOut++;
} }
pBQ->fPrevIn = fPrevIn; pBQ->fPrevIn = fPrevIn;
pBQ->fPrevPrevIn = fPrevPrevIn; pBQ->fPrevPrevIn = fPrevPrevIn;
pBQ->fPrevOut = fPrevOut; pBQ->fPrevOut = fPrevOut;
@ -38,14 +38,14 @@ void ComplexDiv (float fNumerR, float fNumerI, float fDenomR, float fDenomI, flo
bool BilinTransform (float fSX, float fSY, float* pfZX, float* pfZY) bool BilinTransform (float fSX, float fSY, float* pfZX, float* pfZY)
{ {
float fDenom = square (1 - fSX) + square (fSY); float fDenom = square (1 - fSX) + square (fSY);
*pfZX = (1 - square (fSX) - square (fSY)) / fDenom; *pfZX = (1 - square (fSX) - square (fSY)) / fDenom;
*pfZY = 2 * fSY / fDenom; *pfZY = 2 * fSY / fDenom;
return true; return true;
} }
float Calc2D_DistSqr (float fX1, float fY1, float fX2, float fY2) float Calc2D_DistSqr (float fX1, float fY1, float fX2, float fY2)
{ {
return square (fX1 - fX2) + square (fY1 - fY2); return square (fX1 - fX2) + square (fY1 - fY2);
} }

View File

@ -1,14 +1,14 @@
#ifndef __BIQUAD_H__ #ifndef __BIQUAD_H__
#define __BIQUAD_H__ #define __BIQUAD_H__
typedef struct { typedef struct {
float* pfIn; float* pfIn;
float* pfOut; float* pfOut;
float fNumerCoeffs [3]; // B0 B1 B2 float fNumerCoeffs [3]; // B0 B1 B2
float fDenomCoeffs [2]; // A1 A2 float fDenomCoeffs [2]; // A1 A2
float fPrevIn; float fPrevIn;
float fPrevPrevIn; float fPrevPrevIn;
float fPrevOut; float fPrevOut;
float fPrevPrevOut; float fPrevPrevOut;
} BiquadStruct; } BiquadStruct;
void Biquad_Process (BiquadStruct* pBQ, int iNumSamples); void Biquad_Process (BiquadStruct* pBQ, int iNumSamples);
void ComplexDiv (float fNumerR, float fNumerI, float fDenomR, float fDenomI, float* pfQuotientR, float* pfQuotientI); void ComplexDiv (float fNumerR, float fNumerI, float fDenomR, float fDenomI, float* pfQuotientR, float* pfQuotientI);

View File

@ -1,12 +1,12 @@
/********************************************************************** /**********************************************************************
Audacity: A Digital Audio Editor Audacity: A Digital Audio Editor
EffectScienFilter.h EffectScienFilter.h
Norm C Norm C
Mitch Golden Mitch Golden
Vaughan Johnson (Preview) Vaughan Johnson (Preview)
***********************************************************************/ ***********************************************************************/
@ -69,7 +69,7 @@ public:
virtual bool PromptUser(); virtual bool PromptUser();
virtual bool DontPromptUser(); virtual bool DontPromptUser();
virtual bool TransferParameters( Shuttle & shuttle ); virtual bool TransferParameters( Shuttle & shuttle );
bool CalcFilterCoeffs (void); bool CalcFilterCoeffs (void);
virtual bool Process(); virtual bool Process();
@ -78,10 +78,10 @@ public:
private: private:
bool ProcessOne(int count, WaveTrack * t, bool ProcessOne(int count, WaveTrack * t,
sampleCount start, sampleCount len); sampleCount start, sampleCount len);
void Filter(sampleCount len, void Filter(sampleCount len,
float *buffer); float *buffer);
void ReadPrefs(); void ReadPrefs();
//int mM; //int mM;
@ -101,8 +101,8 @@ private:
public: public:
friend class ScienFilterDialog; friend class ScienFilterDialog;
friend class ScienFilterPanel; friend class ScienFilterPanel;
}; };
@ -110,15 +110,15 @@ class ScienFilterPanel: public wxPanel
{ {
public: public:
ScienFilterPanel( double loFreq, double hiFreq, ScienFilterPanel( double loFreq, double hiFreq,
ScienFilterDialog *parent, ScienFilterDialog *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize); const wxSize& size = wxDefaultSize);
~ScienFilterPanel(); ~ScienFilterPanel();
#if 0 #if 0
Needed only if user can draw in the graph Needed only if user can draw in the graph
void OnMouseEvent(wxMouseEvent & event); void OnMouseEvent(wxMouseEvent & event);
void OnCaptureLost(wxMouseCaptureLostEvent & event); void OnCaptureLost(wxMouseCaptureLostEvent & event);
#endif #endif
void OnPaint(wxPaintEvent & event); void OnPaint(wxPaintEvent & event);
@ -156,13 +156,13 @@ class ScienFilterDialog: public wxDialog //, public XMLTagHandler
public: public:
// constructors and destructors // constructors and destructors
ScienFilterDialog(EffectScienFilter * effect, ScienFilterDialog(EffectScienFilter * effect,
double loFreq, double hiFreq, double loFreq, double hiFreq,
//long windowSize, wxString CurveName, bool disallowCustom, //long windowSize, wxString CurveName, bool disallowCustom,
wxWindow *parent, wxWindowID id, wxWindow *parent, wxWindowID id,
const wxString &title, const wxString &title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE ); long style = wxDEFAULT_DIALOG_STYLE );
~ScienFilterDialog(); ~ScienFilterDialog();
// WDR: method declarations for ScienFilterDialog // WDR: method declarations for ScienFilterDialog
@ -170,7 +170,7 @@ public:
virtual bool TransferDataToWindow(); virtual bool TransferDataToWindow();
virtual bool TransferGraphLimitsFromWindow(); virtual bool TransferGraphLimitsFromWindow();
virtual bool CalcFilter(EffectScienFilter* effect); virtual bool CalcFilter(EffectScienFilter* effect);
float FilterMagnAtFreq (float Freq); float FilterMagnAtFreq (float Freq);
wxChoice* mFilterTypeCtl; wxChoice* mFilterTypeCtl;
wxChoice* mFilterSubTypeCtl; wxChoice* mFilterSubTypeCtl;