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:
[legend]
Collaboration diagram for LinearInputRateTimeWarper:
[legend]

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))
51{
52 wxASSERT(mRStart != 0.0);
53 wxASSERT(tStart < tEnd);
54}
LinearTimeWarper mRateWarper
Definition: TimeWarper.h:103

References mRStart.

Member Function Documentation

◆ Warp()

double LinearInputRateTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 41 of file TimeWarper.cpp.

42{
43 double rate = mRateWarper.Warp(originalTime);
44 return mTStart + mScale*log(rate/mRStart);
45}
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
private

Definition at line 103 of file TimeWarper.h.

Referenced by Warp().

◆ mRStart

double LinearInputRateTimeWarper::mRStart
private

Definition at line 104 of file TimeWarper.h.

Referenced by LinearInputRateTimeWarper(), and Warp().

◆ mScale

double LinearInputRateTimeWarper::mScale
private

Definition at line 106 of file TimeWarper.h.

Referenced by Warp().

◆ mTStart

double LinearInputRateTimeWarper::mTStart
private

Definition at line 105 of file TimeWarper.h.

Referenced by Warp().


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