Audacity 3.2.0
Enumerations | Functions | Variables
MeterPanel.cpp File Reference
#include "MeterPanel.h"
#include <algorithm>
#include <wx/setup.h>
#include <wx/wxcrtvararg.h>
#include <wx/defs.h>
#include <wx/dialog.h>
#include <wx/dcbuffer.h>
#include <wx/frame.h>
#include <wx/image.h>
#include <wx/intl.h>
#include <wx/menu.h>
#include <wx/settings.h>
#include <wx/textdlg.h>
#include <wx/numdlg.h>
#include <wx/radiobut.h>
#include <wx/tooltip.h>
#include <math.h>
#include "../AudioIO.h"
#include "AColor.h"
#include "../widgets/BasicMenu.h"
#include "ImageManipulation.h"
#include "Decibels.h"
#include "Project.h"
#include "../ProjectAudioManager.h"
#include "ProjectStatus.h"
#include "../ProjectWindows.h"
#include "Prefs.h"
#include "../ShuttleGui.h"
#include "Theme.h"
#include "../widgets/wxWidgetsWindowPlacement.h"
#include "AllThemeResources.h"
#include "../widgets/valnum.h"
#include "../../images/SpeakerMenu.xpm"
#include "../../images/MicMenu.xpm"
Include dependency graph for MeterPanel.cpp:

Go to the source code of this file.

Enumerations

enum  { OnMeterUpdateID = 6000 , OnMonitorID , OnPreferencesID }
 

Functions

static int MeterPrefsID ()
 
static float floatMax (float a, float b)
 
static int intmax (int a, int b)
 
static float ClipZeroToOne (float z)
 
static float ToDB (float v, float range)
 

Variables

static const long MIN_REFRESH_RATE = 1
 
static const long MAX_REFRESH_RATE = 100
 
static const int gap = 2
 
static const wxChar * PrefStyles []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OnMeterUpdateID 
OnMonitorID 
OnPreferencesID 

Definition at line 268 of file MeterPanel.cpp.

268 {
269 OnMeterUpdateID = 6000,
272};
@ OnPreferencesID
Definition: MeterPanel.cpp:271
@ OnMonitorID
Definition: MeterPanel.cpp:270
@ OnMeterUpdateID
Definition: MeterPanel.cpp:269

Function Documentation

◆ ClipZeroToOne()

static float ClipZeroToOne ( float  z)
static

Definition at line 964 of file MeterPanel.cpp.

965{
966 if (z > 1.0)
967 return 1.0;
968 else if (z < 0.0)
969 return 0.0;
970 else
971 return z;
972}

Referenced by ToDB().

Here is the caller graph for this function:

◆ floatMax()

static float floatMax ( float  a,
float  b 
)
static

Definition at line 947 of file MeterPanel.cpp.

948{
949 return a>b? a: b;
950}

Referenced by MeterPanel::OnMeterUpdate(), and MeterPanel::UpdateDisplay().

Here is the caller graph for this function:

◆ intmax()

static int intmax ( int  a,
int  b 
)
static

Definition at line 959 of file MeterPanel.cpp.

960{
961 return a>b? a: b;
962}

Referenced by MeterPanel::HandleLayout().

Here is the caller graph for this function:

◆ MeterPrefsID()

static int MeterPrefsID ( )
static

Definition at line 452 of file MeterPanel.cpp.

453{
454 static int value = wxNewId();
455 return value;
456}

Referenced by MeterPanel::OnPreferences(), and MeterPanel::UpdateSelectedPrefs().

Here is the caller graph for this function:

◆ ToDB()

static float ToDB ( float  v,
float  range 
)
static

Definition at line 974 of file MeterPanel.cpp.

975{
976 double db;
977 if (v > 0)
978 db = LINEAR_TO_DB(fabs(v));
979 else
980 db = -999;
981 return ClipZeroToOne((db + range) / range);
982}
#define LINEAR_TO_DB(x)
Definition: MemoryX.h:503
static float ClipZeroToOne(float z)
Definition: MeterPanel.cpp:964

References ClipZeroToOne(), and LINEAR_TO_DB.

Referenced by MeterPanel::OnMeterUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ gap

const int gap = 2
static

◆ MAX_REFRESH_RATE

const long MAX_REFRESH_RATE = 100
static

Definition at line 157 of file MeterPanel.cpp.

Referenced by MeterPanel::OnPreferences(), and MeterPanel::UpdatePrefs().

◆ MIN_REFRESH_RATE

const long MIN_REFRESH_RATE = 1
static

Definition at line 156 of file MeterPanel.cpp.

Referenced by MeterPanel::OnPreferences(), and MeterPanel::UpdatePrefs().

◆ PrefStyles

const wxChar* PrefStyles[]
static
Initial value:
=
{
wxT("AutomaticStereo"),
wxT("HorizontalStereo"),
wxT("VerticalStereo")
}

Definition at line 261 of file MeterPanel.cpp.