mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-18 17:10:05 +02:00
Remove Envelope::GetValueAtX
This commit is contained in:
parent
6b9e7506dd
commit
c5754ee751
@ -1026,14 +1026,6 @@ double Envelope::GetValue(double t) const
|
||||
return temp;
|
||||
}
|
||||
|
||||
// 'X' is in pixels and relative to track.
|
||||
double Envelope::GetValueAtX(int x, const wxRect & r, double h, double pps)
|
||||
{
|
||||
// Convert x to time.
|
||||
double t = (x - r.x) / pps + h ;//-mOffset;
|
||||
return GetValue(t);
|
||||
}
|
||||
|
||||
/// @param Lo returns last index at or before this time.
|
||||
/// @param Hi returns first index after this time.
|
||||
void Envelope::BinarySearchForTime( int &Lo, int &Hi, double t ) const
|
||||
|
@ -151,8 +151,6 @@ class Envelope : public XMLTagHandler {
|
||||
// Accessors
|
||||
/** \brief Get envelope value at time t */
|
||||
double GetValue(double t) const;
|
||||
/** \brief Get envelope value at pixel X */
|
||||
double GetValueAtX(int x, const wxRect & r, double h, double pps);
|
||||
|
||||
/** \brief Get many envelope points at once.
|
||||
*
|
||||
|
@ -7008,8 +7008,8 @@ bool TrackPanel::HitTestEnvelope(Track *track, wxRect &r, wxMouseEvent & event)
|
||||
return false; // No envelope, not a hit, so return.
|
||||
|
||||
// Get envelope point, range 0.0 to 1.0
|
||||
double envValue = envelope->GetValueAtX(
|
||||
event.m_x, r, mViewInfo->h, mViewInfo->zoom );
|
||||
// Convert x to time.
|
||||
const double envValue = envelope->GetValue(mViewInfo->PositionToTime(event.m_x, r.x));
|
||||
|
||||
float zoomMin, zoomMax;
|
||||
wavetrack->GetDisplayBounds(&zoomMin, &zoomMax);
|
||||
|
Loading…
x
Reference in New Issue
Block a user