⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compressor.h

📁 Audacity是一款用於錄音和編輯聲音的、免費的開放源碼軟體。它可以執行於Mac OS X、Microsoft Windows、GNU/Linux和其它作業系統
💻 H
字号:
/**********************************************************************  Audacity: A Digital Audio Editor  Compressor.h  Dominic Mazzoni**********************************************************************/#ifndef __AUDACITY_EFFECT_COMPRESSOR__#define __AUDACITY_EFFECT_COMPRESSOR__class wxString;#include <wx/defs.h>#include <wx/bitmap.h>#include <wx/button.h>#include <wx/checkbox.h>#include <wx/slider.h>#include <wx/panel.h>#include <wx/sizer.h>#include <wx/stattext.h>#include <wx/intl.h>#include "TwoPassSimpleMono.h"class WaveTrack;class EffectCompressor: public EffectTwoPassSimpleMono {   public:      EffectCompressor();      virtual wxString GetEffectName() {      return wxString(_("Compressor..."));   }      virtual wxString GetEffectAction() {      return wxString(_("Applying Dynamic Range Compression..."));   }      virtual bool PromptUser(); protected:   virtual bool ProcessPass1(float *buffer, sampleCount len);   virtual bool ProcessPass2(float *buffer, sampleCount len); private:   virtual bool NewTrackPass1();   virtual bool InitPass1();   virtual bool InitPass2();   float AvgCircle(float x);   void Follow(float x, double *outEnv, int maxBack);   float DoCompression(float x, double env);      double    mAttackTime;   double    mThresholdDB;   double    mRatio;   bool      mNormalize;	//MJS      double    mDecayTime;   double    mAttackFactor;   double    mDecayFactor;   double    mFloor;   double    mThreshold;   double    mGain;   double    mRMSSum;   int       mCircleSize;   int       mCirclePos;   double   *mCircle;   double   *mLevelCircle;   double    mLastLevel;   double    mMax;			//MJS   friend class CompressorDialog;};class CompressorPanel: public wxPanel{public:   CompressorPanel( wxWindow *parent, wxWindowID id,                     const wxPoint& pos = wxDefaultPosition,                    const wxSize& size = wxDefaultSize);   void OnPaint(wxPaintEvent & event);   double threshold;   double ratio;private:   wxBitmap *mBitmap;   wxRect mEnvRect;   int mWidth;   int mHeight;   DECLARE_EVENT_TABLE()};// WDR: class declarations//----------------------------------------------------------------------------// CompressorDialog//----------------------------------------------------------------------------class CompressorDialog: public wxDialog{public:   // constructors and destructors   CompressorDialog( EffectCompressor *effect,                     wxWindow *parent, wxWindowID id, const wxString &title,                     const wxPoint& pos = wxDefaultPosition,                     const wxSize& size = wxDefaultSize,                     long style = wxDEFAULT_DIALOG_STYLE );   double threshold;   double ratio;   double attack;   bool useGain;      virtual bool TransferDataToWindow();   virtual bool TransferDataFromWindow();   private:   void OnOk( wxCommandEvent &event );   void OnCancel( wxCommandEvent &event );   void OnSize( wxSizeEvent &event );   void OnSlider( wxCommandEvent &event );   void OnPreview( wxCommandEvent &event );   EffectCompressor *mEffect;   CompressorPanel *mPanel;   wxSlider *mThresholdSlider;   wxSlider *mRatioSlider;   wxSlider *mAttackSlider;   wxCheckBox *mGainCheckBox;   wxStaticText *mThresholdText;   wxStaticText *mRatioText;   wxStaticText *mAttackText;   private:   DECLARE_EVENT_TABLE()};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -