mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 16:39:30 +02:00
An overload of Envelope::GetValues for nonuniform time steps, taking ZoomInfo
This commit is contained in:
parent
c4386f4dc8
commit
5316032fee
@ -1180,6 +1180,13 @@ void Envelope::GetValues(double *buffer, int bufferLen,
|
||||
}
|
||||
}
|
||||
|
||||
void Envelope::GetValues
|
||||
(double *buffer, int bufferLen, int leftOffset, const ZoomInfo &zoomInfo) const
|
||||
{
|
||||
for (int xx = 0; xx < bufferLen; ++xx)
|
||||
buffer[xx] = GetValue(zoomInfo.PositionToTime(xx, -leftOffset));
|
||||
}
|
||||
|
||||
int Envelope::NumberOfPointsAfter(double t)
|
||||
{
|
||||
if( t >= mEnv[mEnv.Count()-1]->GetT() )
|
||||
|
@ -160,6 +160,11 @@ class Envelope : public XMLTagHandler {
|
||||
* more than one value in a row. */
|
||||
void GetValues(double *buffer, int len, double t0, double tstep) const;
|
||||
|
||||
/** \brief Get many envelope points at once, but don't assume uniform time step.
|
||||
*/
|
||||
void GetValues
|
||||
(double *buffer, int bufferLen, int leftOffset, const ZoomInfo &zoomInfo) const;
|
||||
|
||||
int NumberOfPointsAfter(double t);
|
||||
double NextPointAfter(double t);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user