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

#include <TimeWarper.h>

Inheritance diagram for GeometricOutputTimeWarper:
TimeWarper

Public Member Functions

 GeometricOutputTimeWarper (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 mC0
 

Detailed Description

Definition at line 167 of file TimeWarper.h.

Constructor & Destructor Documentation

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

Definition at line 129 of file TimeWarper.cpp.

131 : mTimeWarper(tStart, 0.0, tEnd, 1.0), mTStart(tStart),
132  mScale((tEnd-tStart)/(rEnd-rStart)), mC0((rEnd-rStart)/rStart)
133 {
134  wxASSERT(rStart > 0.0);
135  wxASSERT(rEnd > 0.0);
136  wxASSERT(tStart < tEnd);
137 }
LinearTimeWarper mTimeWarper
Definition: TimeWarper.h:170

Member Function Documentation

double GeometricOutputTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 123 of file TimeWarper.cpp.

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

124 {
125  double scaledTime = mTimeWarper.Warp(originalTime);
126  return mTStart + mScale*log1p(mC0 * scaledTime);
127 }
LinearTimeWarper mTimeWarper
Definition: TimeWarper.h:170
double Warp(double originalTime) const override
Definition: TimeWarper.cpp:34

Member Data Documentation

double GeometricOutputTimeWarper::mC0
private

Definition at line 173 of file TimeWarper.h.

Referenced by Warp().

double GeometricOutputTimeWarper::mScale
private

Definition at line 172 of file TimeWarper.h.

Referenced by Warp().

LinearTimeWarper GeometricOutputTimeWarper::mTimeWarper
private

Definition at line 170 of file TimeWarper.h.

Referenced by Warp().

double GeometricOutputTimeWarper::mTStart
private

Definition at line 171 of file TimeWarper.h.

Referenced by Warp().


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