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

#include <TimeWarper.h>

Inheritance diagram for GeometricInputTimeWarper:
[legend]
Collaboration diagram for GeometricInputTimeWarper:
[legend]

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 ()
 
virtual double Warp (double originalTime) const =0
 

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

Definition at line 114 of file TimeWarper.cpp.

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

Member Function Documentation

◆ Warp()

double GeometricInputTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 108 of file TimeWarper.cpp.

109{
110 double scaledTime = mTimeWarper.Warp(originalTime);
111 return mTStart + mScale*(pow(mRatio,scaledTime) - 1.0);
112}
double Warp(double originalTime) const override
Definition: TimeWarper.cpp:36

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

Here is the call graph for this function:

Member Data Documentation

◆ mRatio

double GeometricInputTimeWarper::mRatio
private

Definition at line 160 of file TimeWarper.h.

Referenced by Warp().

◆ mScale

double GeometricInputTimeWarper::mScale
private

Definition at line 159 of file TimeWarper.h.

Referenced by Warp().

◆ mTimeWarper

LinearTimeWarper GeometricInputTimeWarper::mTimeWarper
private

Definition at line 157 of file TimeWarper.h.

Referenced by Warp().

◆ mTStart

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: