Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
LinearInputStretchTimeWarper Class Referencefinal

#include <TimeWarper.h>

Inheritance diagram for LinearInputStretchTimeWarper:
Collaboration diagram for LinearInputStretchTimeWarper:

Public Member Functions

 LinearInputStretchTimeWarper (double tStart, double tEnd, double rStart, double rEnd)
double Warp (double originalTime) const override
- Public Member Functions inherited from TimeWarper
virtual ~TimeWarper ()
virtual double Warp (double originalTime) const =0

Private Attributes

LinearTimeWarper mTimeWarper
double mTStart
double mC1
double mC2

Detailed Description

Definition at line 128 of file TimeWarper.h.

Constructor & Destructor Documentation

◆ LinearInputStretchTimeWarper()

LinearInputStretchTimeWarper::LinearInputStretchTimeWarper ( double  tStart,
double  tEnd,
double  rStart,
double  rEnd 

Definition at line 81 of file TimeWarper.cpp.

83: mTimeWarper(tStart, 0.0, tEnd, 1.0), mTStart(tStart),
84 mC1((tEnd-tStart)/rStart), mC2(0.5*(rStart/rEnd - 1.0))
86 wxASSERT(rStart > 0.0);
87 wxASSERT(rEnd > 0.0);
88 wxASSERT(tStart < tEnd);
LinearTimeWarper mTimeWarper
Definition: TimeWarper.h:131

Member Function Documentation

◆ Warp()

double LinearInputStretchTimeWarper::Warp ( double  originalTime) const

Implements TimeWarper.

Definition at line 75 of file TimeWarper.cpp.

77 double scaledTime = mTimeWarper.Warp(originalTime);
78 return mTStart + mC1 * scaledTime * (1.0 + mC2 * scaledTime);
double Warp(double originalTime) const override
Definition: TimeWarper.cpp:36

References mC1, mC2, mTimeWarper, mTStart, and LinearTimeWarper::Warp().

Here is the call graph for this function:

Member Data Documentation

◆ mC1

double LinearInputStretchTimeWarper::mC1

Definition at line 133 of file TimeWarper.h.

Referenced by Warp().

◆ mC2

double LinearInputStretchTimeWarper::mC2

Definition at line 134 of file TimeWarper.h.

Referenced by Warp().

◆ mTimeWarper

LinearTimeWarper LinearInputStretchTimeWarper::mTimeWarper

Definition at line 131 of file TimeWarper.h.

Referenced by Warp().

◆ mTStart

double LinearInputStretchTimeWarper::mTStart

Definition at line 132 of file TimeWarper.h.

Referenced by Warp().

The documentation for this class was generated from the following files: