Audacity  3.0.3
Classes | Namespaces | Macros | Functions | Variables
AutoDuck.cpp File Reference
#include "AutoDuck.h"
#include "LoadEffects.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 "Prefs.h"
#include "../Shuttle.h"
#include "../ShuttleGui.h"
#include "Theme.h"
#include "../widgets/valnum.h"
#include "../WaveTrack.h"
#include "../widgets/AudacityMessageBox.h"
Include dependency graph for AutoDuck.cpp:

Go to the source code of this file.

Classes

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

Namespaces

 anonymous_namespace{AutoDuck.cpp}
 

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
 
BuiltinEffectsModule::Registration< EffectAutoDuckanonymous_namespace{AutoDuck.cpp}::reg
 

Macro Definition Documentation

◆ CONTROL_POINT_MIN_MOVE

#define CONTROL_POINT_MIN_MOVE   5

Definition at line 608 of file AutoDuck.cpp.

◆ CONTROL_POINT_REGION

#define CONTROL_POINT_REGION   10

Definition at line 607 of file AutoDuck.cpp.

◆ DUCK_AMOUNT_SCALE

#define DUCK_AMOUNT_SCALE   8

Definition at line 617 of file AutoDuck.cpp.

◆ DUCK_AMOUNT_START

#define DUCK_AMOUNT_START   50

Definition at line 614 of file AutoDuck.cpp.

◆ FADE_DOWN_START

#define FADE_DOWN_START   150

Definition at line 612 of file AutoDuck.cpp.

◆ FADE_SCALE

#define FADE_SCALE   40

Definition at line 616 of file AutoDuck.cpp.

◆ FADE_UP_START

#define FADE_UP_START   450

Definition at line 613 of file AutoDuck.cpp.

◆ TEXT_DISTANCE

#define TEXT_DISTANCE   15

Definition at line 610 of file AutoDuck.cpp.

Function Documentation

◆ GetDistance()

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

Definition at line 619 of file AutoDuck.cpp.

620 {
621  int distanceX = abs(first.x - second.x);
622  int distanceY = abs(first.y - second.y);
623  if (distanceX > distanceY)
624  return distanceX;
625  else
626  return distanceY;
627 }

Referenced by EffectAutoDuckPanel::GetNearestControlPoint().

Here is the caller graph for this function:

◆ Param() [1/7]

Param ( DuckAmountDb  ,
double  ,
wxT("DuckAmountDb")  ,
-12.  0,
-24.  0,
0.  0,
 
)

◆ Param() [2/7]

Param ( InnerFadeDownLen  ,
double  ,
wxT("InnerFadeDownLen")  ,
0.  0,
0.  0,
3.  0,
 
)

◆ Param() [3/7]

Param ( InnerFadeUpLen  ,
double  ,
wxT("InnerFadeUpLen")  ,
0.  0,
0.  0,
3.  0,
 
)

◆ Param() [4/7]

Param ( MaximumPause  ,
double  ,
wxT("MaximumPause")  ,
1.  0,
0.  0,
DBL_MAX  ,
 
)

◆ Param() [5/7]

Param ( OuterFadeDownLen  ,
double  ,
wxT("OuterFadeDownLen")  ,
0.  5,
0.  0,
3.  0,
 
)

◆ Param() [6/7]

Param ( OuterFadeUpLen  ,
double  ,
wxT("OuterFadeUpLen")  ,
0.  5,
0.  0,
3.  0,
 
)

◆ Param() [7/7]

Param ( ThresholdDb  ,
double  ,
wxT("ThresholdDb")  ,
-30.  0,
-100.  0,
0.  0,
 
)

Variable Documentation

◆ kBufSize

const size_t kBufSize = 131072u
static

Definition at line 56 of file AutoDuck.cpp.

Referenced by EffectAutoDuck::ApplyDuckFade(), and EffectAutoDuck::Process().

◆ kRMSWindowSize

const size_t kRMSWindowSize = 100u
static

Definition at line 57 of file AutoDuck.cpp.

Referenced by EffectAutoDuck::Process().