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/dcbuffer.h>
#include <wx/frame.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 "LinearUpdater.h"
#include "Project.h"
#include "ProjectAudioIO.h"
#include "ProjectStatus.h"
#include "../ProjectWindows.h"
#include "Prefs.h"
#include "ShuttleGui.h"
#include "Theme.h"
#include "wxWidgetsWindowPlacement.h"
#include "../widgets/LinearDBFormat.h"
#include "../widgets/RealFormat.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 , OnTipTimeoutID }
 

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 
OnTipTimeoutID 

Definition at line 266 of file MeterPanel.cpp.

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

Function Documentation

◆ ClipZeroToOne()

static float ClipZeroToOne ( float  z)
static

Definition at line 937 of file MeterPanel.cpp.

938{
939 if (z > 1.0)
940 return 1.0;
941 else if (z < 0.0)
942 return 0.0;
943 else
944 return z;
945}

Referenced by ToDB().

Here is the caller graph for this function:

◆ floatMax()

static float floatMax ( float  a,
float  b 
)
static

Definition at line 920 of file MeterPanel.cpp.

921{
922 return a>b? a: b;
923}

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 932 of file MeterPanel.cpp.

933{
934 return a>b? a: b;
935}

Referenced by MeterPanel::HandleLayout().

Here is the caller graph for this function:

◆ MeterPrefsID()

static int MeterPrefsID ( )
static

Definition at line 456 of file MeterPanel.cpp.

457{
458 static int value = wxNewId();
459 return value;
460}

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 947 of file MeterPanel.cpp.

948{
949 double db;
950 if (v > 0)
951 db = LINEAR_TO_DB(fabs(v));
952 else
953 db = -999;
954 return ClipZeroToOne((db + range) / range);
955}
#define LINEAR_TO_DB(x)
Definition: MemoryX.h:338
static float ClipZeroToOne(float z)
Definition: MeterPanel.cpp:937

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 155 of file MeterPanel.cpp.

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

◆ MIN_REFRESH_RATE

const long MIN_REFRESH_RATE = 1
static

Definition at line 154 of file MeterPanel.cpp.

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

◆ PrefStyles

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

Definition at line 259 of file MeterPanel.cpp.