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

944{
945 if (z > 1.0)
946 return 1.0;
947 else if (z < 0.0)
948 return 0.0;
949 else
950 return z;
951}

Referenced by ToDB().

Here is the caller graph for this function:

◆ floatMax()

static float floatMax ( float  a,
float  b 
)
static

Definition at line 926 of file MeterPanel.cpp.

927{
928 return a>b? a: b;
929}

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

939{
940 return a>b? a: b;
941}

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

954{
955 double db;
956 if (v > 0)
957 db = LINEAR_TO_DB(fabs(v));
958 else
959 db = -999;
960 return ClipZeroToOne((db + range) / range);
961}
#define LINEAR_TO_DB(x)
Definition: MemoryX.h:562
static float ClipZeroToOne(float z)
Definition: MeterPanel.cpp:943

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.