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 = 0
 
static const wxChar * PrefStyles []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OnMeterUpdateID 
OnMonitorID 
OnPreferencesID 
OnTipTimeoutID 

Definition at line 203 of file MeterPanel.cpp.

203 {
204 OnMeterUpdateID = 6000,
208};
@ OnPreferencesID
Definition: MeterPanel.cpp:206
@ OnMonitorID
Definition: MeterPanel.cpp:205
@ OnMeterUpdateID
Definition: MeterPanel.cpp:204
@ OnTipTimeoutID
Definition: MeterPanel.cpp:207

Function Documentation

◆ ClipZeroToOne()

static float ClipZeroToOne ( float  z)
static

Definition at line 877 of file MeterPanel.cpp.

878{
879 if (z > 1.0)
880 return 1.0;
881 else if (z < 0.0)
882 return 0.0;
883 else
884 return z;
885}

Referenced by ToDB().

Here is the caller graph for this function:

◆ floatMax()

static float floatMax ( float  a,
float  b 
)
static

Definition at line 860 of file MeterPanel.cpp.

861{
862 return a>b? a: b;
863}

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

873{
874 return a>b? a: b;
875}

Referenced by MeterPanel::HandleLayout().

Here is the caller graph for this function:

◆ MeterPrefsID()

static int MeterPrefsID ( )
static

Definition at line 388 of file MeterPanel.cpp.

389{
390 static int value = wxNewId();
391 return value;
392}

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

888{
889 double db;
890 if (v > 0)
891 db = LINEAR_TO_DB(fabs(v));
892 else
893 db = -999;
894 return ClipZeroToOne((db + range) / range);
895}
#define LINEAR_TO_DB(x)
Definition: MemoryX.h:339
static float ClipZeroToOne(float z)
Definition: MeterPanel.cpp:877

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 = 0
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 196 of file MeterPanel.cpp.