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 66 of file EnvelopeHandle.cpp.

69 {
70 const auto &viewInfo = ViewInfo::Get( project );
71 dBRange = DecibelScaleCutoff.Read();
72 dB = tt.GetDisplayLog();
73 zoomMin = tt.GetRangeLower(), zoomMax = tt.GetRangeUpper();
74 if (dB) {
75 // MB: silly way to undo the work of GetWaveYPos while still getting a logarithmic scale
76 zoomMin = LINEAR_TO_DB(std::max(1.0e-7, double(zoomMin))) / dBRange + 1.0;
77 zoomMax = LINEAR_TO_DB(std::max(1.0e-7, double(zoomMax))) / dBRange + 1.0;
78 }
79 }
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:94
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: