Audacity  3.0.3
Public Member Functions | Public Attributes | List of all members
MeterUpdateMsg Class Reference

Message used to update the MeterPanel. More...

#include <MeterPanel.h>

Public Member Functions

 MeterUpdateMsg ()
 
 ~MeterUpdateMsg ()
 
wxString toString ()
 Print out all the values in the meter update message. More...
 
wxString toStringIfClipped ()
 Only print meter updates if clipping may be happening. More...
 

Public Attributes

int numFrames
 
float peak [kMaxMeterBars]
 
float rms [kMaxMeterBars]
 
bool clipping [kMaxMeterBars]
 
int headPeakCount [kMaxMeterBars]
 
int tailPeakCount [kMaxMeterBars]
 

Detailed Description

Message used to update the MeterPanel.

Definition at line 50 of file MeterPanel.h.

Constructor & Destructor Documentation

◆ MeterUpdateMsg()

MeterUpdateMsg::MeterUpdateMsg ( )
inline

Definition at line 61 of file MeterPanel.h.

61 { }

◆ ~MeterUpdateMsg()

MeterUpdateMsg::~MeterUpdateMsg ( )
inline

Definition at line 62 of file MeterPanel.h.

62 { }

Member Function Documentation

◆ toString()

wxString MeterUpdateMsg::toString ( )

Print out all the values in the meter update message.

Definition at line 160 of file MeterPanel.cpp.

161 {
162 wxString output; // somewhere to build up a string in
163 output = wxString::Format(wxT("Meter update msg: %i channels, %i samples\n"), \
165 for (int i = 0; i<kMaxMeterBars; i++)
166  { // for each channel of the meters
167  output += wxString::Format(wxT("%f peak, %f rms "), peak[i], rms[i]);
168  if (clipping[i])
169  output += wxString::Format(wxT("clipped "));
170  else
171  output += wxString::Format(wxT("no clip "));
172  output += wxString::Format(wxT("%i head, %i tail\n"), headPeakCount[i], tailPeakCount[i]);
173  }
174 return output;
175 }

References clipping, headPeakCount, kMaxMeterBars, numFrames, peak, rms, and tailPeakCount.

Referenced by toStringIfClipped().

Here is the caller graph for this function:

◆ toStringIfClipped()

wxString MeterUpdateMsg::toStringIfClipped ( )

Only print meter updates if clipping may be happening.

Definition at line 177 of file MeterPanel.cpp.

178 {
179  for (int i = 0; i<kMaxMeterBars; i++)
180  {
181  if (clipping[i] || (headPeakCount[i] > 0) || (tailPeakCount[i] > 0))
182  return toString();
183  }
184  return wxT("");
185 }

References clipping, headPeakCount, kMaxMeterBars, tailPeakCount, and toString().

Here is the call graph for this function:

Member Data Documentation

◆ clipping

bool MeterUpdateMsg::clipping[kMaxMeterBars]

◆ headPeakCount

int MeterUpdateMsg::headPeakCount[kMaxMeterBars]

◆ numFrames

int MeterUpdateMsg::numFrames

Definition at line 53 of file MeterPanel.h.

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

◆ peak

float MeterUpdateMsg::peak[kMaxMeterBars]

Definition at line 54 of file MeterPanel.h.

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

◆ rms

float MeterUpdateMsg::rms[kMaxMeterBars]

Definition at line 55 of file MeterPanel.h.

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

◆ tailPeakCount

int MeterUpdateMsg::tailPeakCount[kMaxMeterBars]

The documentation for this class was generated from the following files:
MeterUpdateMsg::rms
float rms[kMaxMeterBars]
Definition: MeterPanel.h:55
MeterUpdateMsg::tailPeakCount
int tailPeakCount[kMaxMeterBars]
Definition: MeterPanel.h:58
MeterUpdateMsg::clipping
bool clipping[kMaxMeterBars]
Definition: MeterPanel.h:56
MeterUpdateMsg::peak
float peak[kMaxMeterBars]
Definition: MeterPanel.h:54
MeterUpdateMsg::toString
wxString toString()
Print out all the values in the meter update message.
Definition: MeterPanel.cpp:160
MeterUpdateMsg::numFrames
int numFrames
Definition: MeterPanel.h:53
kMaxMeterBars
const int kMaxMeterBars
Definition: MeterPanel.h:33
MeterUpdateMsg::headPeakCount
int headPeakCount[kMaxMeterBars]
Definition: MeterPanel.h:57