Audacity  2.2.2
Classes | Macros | Functions | Variables
AutoDuck.cpp File Reference
#include "../Audacity.h"
#include "AutoDuck.h"
#include <math.h>
#include <float.h>
#include <wx/dcclient.h>
#include <wx/dcmemory.h>
#include <wx/intl.h>
#include "../AColor.h"
#include "../AllThemeResources.h"
#include "../Internat.h"
#include "../Prefs.h"
#include "../ShuttleGui.h"
#include "../Theme.h"
#include "../widgets/valnum.h"
#include "../WaveTrack.h"
#include "../widgets/ErrorDialog.h"

Go to the source code of this file.

Classes

class  AutoDuckRegion
 a struct that holds a start and end time. More...
 

Macros

#define CONTROL_POINT_REGION   10
 
#define CONTROL_POINT_MIN_MOVE   5
 
#define TEXT_DISTANCE   15
 
#define FADE_DOWN_START   150
 
#define FADE_UP_START   450
 
#define DUCK_AMOUNT_START   50
 
#define FADE_SCALE   40
 
#define DUCK_AMOUNT_SCALE   8
 

Functions

 Param (DuckAmountDb, double, wxT("DuckAmountDb"),-12.0,-24.0, 0.0, 1)
 
 Param (InnerFadeDownLen, double, wxT("InnerFadeDownLen"), 0.0, 0.0, 3.0, 1)
 
 Param (InnerFadeUpLen, double, wxT("InnerFadeUpLen"), 0.0, 0.0, 3.0, 1)
 
 Param (OuterFadeDownLen, double, wxT("OuterFadeDownLen"), 0.5, 0.0, 3.0, 1)
 
 Param (OuterFadeUpLen, double, wxT("OuterFadeUpLen"), 0.5, 0.0, 3.0, 1)
 
 Param (ThresholdDb, double, wxT("ThresholdDb"),-30.0,-100.0, 0.0, 1)
 
 Param (MaximumPause, double, wxT("MaximumPause"), 1.0, 0.0, DBL_MAX, 1)
 
static int GetDistance (const wxPoint &first, const wxPoint &second)
 

Variables

static const size_t kBufSize = 131072u
 
static const size_t kRMSWindowSize = 100u
 

Macro Definition Documentation

#define CONTROL_POINT_MIN_MOVE   5

Definition at line 595 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::OnMotion().

#define CONTROL_POINT_REGION   10

Definition at line 594 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::GetNearestControlPoint().

#define DUCK_AMOUNT_SCALE   8

Definition at line 604 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::OnMotion(), and EffectAutoDuckPanel::OnPaint().

#define DUCK_AMOUNT_START   50

Definition at line 601 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::OnMotion(), and EffectAutoDuckPanel::OnPaint().

#define FADE_DOWN_START   150

Definition at line 599 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::OnMotion(), and EffectAutoDuckPanel::OnPaint().

#define FADE_SCALE   40

Definition at line 603 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::OnMotion(), and EffectAutoDuckPanel::OnPaint().

#define FADE_UP_START   450

Definition at line 600 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::OnMotion(), and EffectAutoDuckPanel::OnPaint().

#define TEXT_DISTANCE   15

Definition at line 597 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::OnPaint().

Function Documentation

static int GetDistance ( const wxPoint &  first,
const wxPoint &  second 
)
static

Definition at line 606 of file AutoDuck.cpp.

Referenced by EffectAutoDuckPanel::GetNearestControlPoint().

607 {
608  int distanceX = abs(first.x - second.x);
609  int distanceY = abs(first.y - second.y);
610  if (distanceX > distanceY)
611  return distanceX;
612  else
613  return distanceY;
614 }
Param ( DuckAmountDb  ,
double  ,
wxT("DuckAmountDb")  ,
-12.  0,
-24.  0,
0.  0,
 
)
Param ( InnerFadeDownLen  ,
double  ,
wxT("InnerFadeDownLen")  ,
0.  0,
0.  0,
3.  0,
 
)
Param ( InnerFadeUpLen  ,
double  ,
wxT("InnerFadeUpLen")  ,
0.  0,
0.  0,
3.  0,
 
)
Param ( OuterFadeDownLen  ,
double  ,
wxT("OuterFadeDownLen")  ,
0.  5,
0.  0,
3.  0,
 
)
Param ( OuterFadeUpLen  ,
double  ,
wxT("OuterFadeUpLen")  ,
0.  5,
0.  0,
3.  0,
 
)
Param ( ThresholdDb  ,
double  ,
wxT("ThresholdDb")  ,
-30.  0,
-100.  0,
0.  0,
 
)
Param ( MaximumPause  ,
double  ,
wxT("MaximumPause")  ,
1.  0,
0.  0,
DBL_MAX  ,
 
)

Variable Documentation

const size_t kBufSize = 131072u
static

Definition at line 55 of file AutoDuck.cpp.

const size_t kRMSWindowSize = 100u
static

Definition at line 56 of file AutoDuck.cpp.

Referenced by EffectAutoDuck::Process().