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)
{
float* pfIn = pBQ->pfIn;
float* pfOut = pBQ->pfOut;
float* pfIn = pBQ->pfIn;
float* pfOut = pBQ->pfOut;
float fPrevIn = pBQ->fPrevIn;
float fPrevPrevIn = pBQ->fPrevPrevIn;
float fPrevOut = pBQ->fPrevOut;
float fPrevPrevOut = pBQ->fPrevPrevOut;
for (int i = 0; i < iNumSamples; i++)
{
float fIn = *pfIn++;
*pfOut = fIn * pBQ->fNumerCoeffs [0] +
fPrevIn * pBQ->fNumerCoeffs [1] +
fPrevPrevIn * pBQ->fNumerCoeffs [2] -
fPrevOut * pBQ->fDenomCoeffs [0] -
fPrevPrevOut * pBQ->fDenomCoeffs [1];
fPrevPrevIn = fPrevIn;
fPrevIn = fIn;
fPrevPrevOut = fPrevOut;
fPrevOut = *pfOut++;
}
for (int i = 0; i < iNumSamples; i++)
{
float fIn = *pfIn++;
*pfOut = fIn * pBQ->fNumerCoeffs [0] +
fPrevIn * pBQ->fNumerCoeffs [1] +
fPrevPrevIn * pBQ->fNumerCoeffs [2] -
fPrevOut * pBQ->fDenomCoeffs [0] -
fPrevPrevOut * pBQ->fDenomCoeffs [1];
fPrevPrevIn = fPrevIn;
fPrevIn = fIn;
fPrevPrevOut = fPrevOut;
fPrevOut = *pfOut++;
}
pBQ->fPrevIn = fPrevIn;
pBQ->fPrevPrevIn = fPrevPrevIn;
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)
{
float fDenom = square (1 - fSX) + square (fSY);
*pfZX = (1 - square (fSX) - square (fSY)) / fDenom;
*pfZY = 2 * fSY / fDenom;
return true;
float fDenom = square (1 - fSX) + square (fSY);
*pfZX = (1 - square (fSX) - square (fSY)) / fDenom;
*pfZY = 2 * fSY / fDenom;
return true;
}
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__
#define __BIQUAD_H__
typedef struct {
float* pfIn;
float* pfOut;
float fNumerCoeffs [3]; // B0 B1 B2
float fDenomCoeffs [2]; // A1 A2
float fPrevIn;
float fPrevPrevIn;
float fPrevOut;
float fPrevPrevOut;
float* pfIn;
float* pfOut;
float fNumerCoeffs [3]; // B0 B1 B2
float fDenomCoeffs [2]; // A1 A2
float fPrevIn;
float fPrevPrevIn;
float fPrevOut;
float fPrevPrevOut;
} BiquadStruct;
void Biquad_Process (BiquadStruct* pBQ, int iNumSamples);
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
Mitch Golden
Vaughan Johnson (Preview)
Norm C
Mitch Golden
Vaughan Johnson (Preview)
***********************************************************************/
@ -69,7 +69,7 @@ public:
virtual bool PromptUser();
virtual bool DontPromptUser();
virtual bool TransferParameters( Shuttle & shuttle );
bool CalcFilterCoeffs (void);
bool CalcFilterCoeffs (void);
virtual bool Process();
@ -78,10 +78,10 @@ public:
private:
bool ProcessOne(int count, WaveTrack * t,
sampleCount start, sampleCount len);
sampleCount start, sampleCount len);
void Filter(sampleCount len,
float *buffer);
float *buffer);
void ReadPrefs();
//int mM;
@ -101,8 +101,8 @@ private:
public:
friend class ScienFilterDialog;
friend class ScienFilterPanel;
friend class ScienFilterDialog;
friend class ScienFilterPanel;
};
@ -110,15 +110,15 @@ class ScienFilterPanel: public wxPanel
{
public:
ScienFilterPanel( double loFreq, double hiFreq,
ScienFilterDialog *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize);
ScienFilterDialog *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize);
~ScienFilterPanel();
#if 0
Needed only if user can draw in the graph
void OnMouseEvent(wxMouseEvent & event);
Needed only if user can draw in the graph
void OnMouseEvent(wxMouseEvent & event);
void OnCaptureLost(wxMouseCaptureLostEvent & event);
#endif
void OnPaint(wxPaintEvent & event);
@ -156,13 +156,13 @@ class ScienFilterDialog: public wxDialog //, public XMLTagHandler
public:
// constructors and destructors
ScienFilterDialog(EffectScienFilter * effect,
double loFreq, double hiFreq,
//long windowSize, wxString CurveName, bool disallowCustom,
wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE );
double loFreq, double hiFreq,
//long windowSize, wxString CurveName, bool disallowCustom,
wxWindow *parent, wxWindowID id,
const wxString &title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE );
~ScienFilterDialog();
// WDR: method declarations for ScienFilterDialog
@ -170,7 +170,7 @@ public:
virtual bool TransferDataToWindow();
virtual bool TransferGraphLimitsFromWindow();
virtual bool CalcFilter(EffectScienFilter* effect);
float FilterMagnAtFreq (float Freq);
float FilterMagnAtFreq (float Freq);
wxChoice* mFilterTypeCtl;
wxChoice* mFilterSubTypeCtl;