Audacity  2.2.2
Public Member Functions | Private Attributes | List of all members
GeometricInputTimeWarper Class Referencefinal

#include <TimeWarper.h>

Inheritance diagram for GeometricInputTimeWarper:
TimeWarper

Public Member Functions

 GeometricInputTimeWarper (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 mScale
 
double mRatio
 

Detailed Description

Definition at line 154 of file TimeWarper.h.

Constructor & Destructor Documentation

GeometricInputTimeWarper::GeometricInputTimeWarper ( double  tStart,
double  tEnd,
double  rStart,
double  rEnd 
)

Definition at line 112 of file TimeWarper.cpp.

114 : mTimeWarper(tStart, 0.0, tEnd, 1.0), mTStart(tStart),
115  mScale((tEnd-tStart)/(log(rStart/rEnd)*rStart)), mRatio(rStart/rEnd)
116 {
117  wxASSERT(rStart != rEnd);
118  wxASSERT(rStart > 0.0);
119  wxASSERT(rEnd > 0.0);
120  wxASSERT(tStart < tEnd);
121 }
LinearTimeWarper mTimeWarper
Definition: TimeWarper.h:157

Member Function Documentation

double GeometricInputTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 106 of file TimeWarper.cpp.

References mRatio, mScale, mTimeWarper, mTStart, and LinearTimeWarper::Warp().

107 {
108  double scaledTime = mTimeWarper.Warp(originalTime);
109  return mTStart + mScale*(pow(mRatio,scaledTime) - 1.0);
110 }
double Warp(double originalTime) const override
Definition: TimeWarper.cpp:34
LinearTimeWarper mTimeWarper
Definition: TimeWarper.h:157

Member Data Documentation

double GeometricInputTimeWarper::mRatio
private

Definition at line 160 of file TimeWarper.h.

Referenced by Warp().

double GeometricInputTimeWarper::mScale
private

Definition at line 159 of file TimeWarper.h.

Referenced by Warp().

LinearTimeWarper GeometricInputTimeWarper::mTimeWarper
private

Definition at line 157 of file TimeWarper.h.

Referenced by Warp().

double GeometricInputTimeWarper::mTStart
private

Definition at line 158 of file TimeWarper.h.

Referenced by Warp().


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