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

TimeScale - rate varies linearly with input. More...

#include <TimeWarper.h>

Inheritance diagram for LinearInputRateTimeWarper:
Collaboration diagram for LinearInputRateTimeWarper:

Public Member Functions

 LinearInputRateTimeWarper (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 mRateWarper
double mRStart
double mTStart
double mScale

Detailed Description

TimeScale - rate varies linearly with input.

Definition at line 100 of file TimeWarper.h.

Constructor & Destructor Documentation

◆ LinearInputRateTimeWarper()

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

Definition at line 47 of file TimeWarper.cpp.

49: mRateWarper(tStart, rStart, tEnd, rEnd), mRStart(rStart),
50 mTStart(tStart), mScale((tEnd-tStart)/(rEnd-rStart))
52 wxASSERT(mRStart != 0.0);
53 wxASSERT(tStart < tEnd);
LinearTimeWarper mRateWarper
Definition: TimeWarper.h:103

References mRStart.

Member Function Documentation

◆ Warp()

double LinearInputRateTimeWarper::Warp ( double  originalTime) const

Implements TimeWarper.

Definition at line 41 of file TimeWarper.cpp.

43 double rate = mRateWarper.Warp(originalTime);
44 return mTStart + mScale*log(rate/mRStart);
double Warp(double originalTime) const override
Definition: TimeWarper.cpp:36

References mRateWarper, mRStart, mScale, mTStart, and LinearTimeWarper::Warp().

Here is the call graph for this function:

Member Data Documentation

◆ mRateWarper

LinearTimeWarper LinearInputRateTimeWarper::mRateWarper

Definition at line 103 of file TimeWarper.h.

Referenced by Warp().

◆ mRStart

double LinearInputRateTimeWarper::mRStart

Definition at line 104 of file TimeWarper.h.

Referenced by LinearInputRateTimeWarper(), and Warp().

◆ mScale

double LinearInputRateTimeWarper::mScale

Definition at line 106 of file TimeWarper.h.

Referenced by Warp().

◆ mTStart

double LinearInputRateTimeWarper::mTStart

Definition at line 105 of file TimeWarper.h.

Referenced by Warp().

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