Audacity 3.2.0
Functions
anonymous_namespace{EnvelopeHandle.cpp} Namespace Reference

Functions

void GetTimeTrackData (const AudacityProject &project, const TimeTrack &tt, double &dBRange, bool &dB, float &zoomMin, float &zoomMax)
 

Function Documentation

◆ GetTimeTrackData()

void anonymous_namespace{EnvelopeHandle.cpp}::GetTimeTrackData ( const AudacityProject project,
const TimeTrack tt,
double &  dBRange,
bool &  dB,
float &  zoomMin,
float &  zoomMax 
)

Definition at line 67 of file EnvelopeHandle.cpp.

70 {
71 const auto &viewInfo = ViewInfo::Get( project );
72 dBRange = DecibelScaleCutoff.Read();
73 dB = tt.GetDisplayLog();
74 zoomMin = tt.GetRangeLower(), zoomMax = tt.GetRangeUpper();
75 if (dB) {
76 // MB: silly way to undo the work of GetWaveYPos while still getting a logarithmic scale
77 zoomMin = LINEAR_TO_DB(std::max(1.0e-7, double(zoomMin))) / dBRange + 1.0;
78 zoomMax = LINEAR_TO_DB(std::max(1.0e-7, double(zoomMax))) / dBRange + 1.0;
79 }
80 }
IntSetting DecibelScaleCutoff
Negation of this value is the lowest dB level that should be shown in dB scales.
Definition: Decibels.cpp:12
#define LINEAR_TO_DB(x)
Definition: MemoryX.h:339
const auto project
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:207
bool GetDisplayLog() const
Definition: TimeTrack.h:95
double GetRangeLower() const
Definition: TimeTrack.cpp:100
double GetRangeUpper() const
Definition: TimeTrack.cpp:105
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235

References DecibelScaleCutoff, ViewInfo::Get(), TimeTrack::GetDisplayLog(), TimeTrack::GetRangeLower(), TimeTrack::GetRangeUpper(), LINEAR_TO_DB, project, and Setting< T >::Read().

Referenced by EnvelopeHandle::Click(), and EnvelopeHandle::TimeTrackHitTest().

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