MCPcopy Create free account
hub / github.com/audacity/audacity / GetTimeTrackData

Function GetTimeTrackData

src/tracks/ui/EnvelopeHandle.cpp:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66namespace {
67 void GetTimeTrackData
68 (const AudacityProject &project, const TimeTrack &tt,
69 double &dBRange, bool &dB, float &zoomMin, float &zoomMax)
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 }
81}
82
83UIHandlePtr EnvelopeHandle::TimeTrackHitTest(

Callers 2

TimeTrackHitTestMethod · 0.85
ClickMethod · 0.85

Calls 5

GetFunction · 0.85
maxFunction · 0.85
ReadMethod · 0.45
GetRangeLowerMethod · 0.45
GetRangeUpperMethod · 0.45

Tested by

no test coverage detected