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

#include <TimeWarper.h>

Inheritance diagram for LinearInputStretchTimeWarper:
TimeWarper

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 ()
 

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 ( double  tStart,
double  tEnd,
double  rStart,
double  rEnd 
)

Definition at line 79 of file TimeWarper.cpp.

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

Member Function Documentation

double LinearInputStretchTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 73 of file TimeWarper.cpp.

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

74 {
75  double scaledTime = mTimeWarper.Warp(originalTime);
76  return mTStart + mC1 * scaledTime * (1.0 + mC2 * scaledTime);
77 }
double Warp(double originalTime) const override
Definition: TimeWarper.cpp:34
LinearTimeWarper mTimeWarper
Definition: TimeWarper.h:131

Member Data Documentation

double LinearInputStretchTimeWarper::mC1
private

Definition at line 133 of file TimeWarper.h.

Referenced by Warp().

double LinearInputStretchTimeWarper::mC2
private

Definition at line 134 of file TimeWarper.h.

Referenced by Warp().

LinearTimeWarper LinearInputStretchTimeWarper::mTimeWarper
private

Definition at line 131 of file TimeWarper.h.

Referenced by Warp().

double LinearInputStretchTimeWarper::mTStart
private

Definition at line 132 of file TimeWarper.h.

Referenced by Warp().


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