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

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

#include <TimeWarper.h>

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

Public Member Functions

 LinearOutputRateTimeWarper (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 mRStart
 
double mTStart
 
double mScale
 
double mC1
 
double mC2
 

Detailed Description

TimeScale - rate varies linearly with output.

Definition at line 113 of file TimeWarper.h.

Constructor & Destructor Documentation

◆ LinearOutputRateTimeWarper()

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

Definition at line 62 of file TimeWarper.cpp.

64: mTimeWarper(tStart, 0.0, tEnd, 1.0),
65 mRStart(rStart), mTStart(tStart),
66 mScale(2.0*(tEnd-tStart)/(rEnd*rEnd-rStart*rStart)),
67 mC1(rStart*rStart), mC2(rEnd*rEnd-rStart*rStart)
68{
69 wxASSERT(rStart != rEnd);
70 wxASSERT(rStart > 0.0);
71 wxASSERT(rEnd > 0.0);
72 wxASSERT(tStart < tEnd);
73}
LinearTimeWarper mTimeWarper
Definition: TimeWarper.h:116

Member Function Documentation

◆ Warp()

double LinearOutputRateTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 56 of file TimeWarper.cpp.

57{
58 double scaledTime = mTimeWarper.Warp(originalTime);
59 return mTStart + mScale*(sqrt(mC1 + scaledTime * mC2) - mRStart);
60}
double Warp(double originalTime) const override
Definition: TimeWarper.cpp:36
__finl float_x4 __vecc sqrt(const float_x4 &a)

References mC1, mC2, mRStart, mScale, mTimeWarper, mTStart, staffpad::audio::simd::sqrt(), and LinearTimeWarper::Warp().

Here is the call graph for this function:

Member Data Documentation

◆ mC1

double LinearOutputRateTimeWarper::mC1
private

Definition at line 120 of file TimeWarper.h.

Referenced by Warp().

◆ mC2

double LinearOutputRateTimeWarper::mC2
private

Definition at line 121 of file TimeWarper.h.

Referenced by Warp().

◆ mRStart

double LinearOutputRateTimeWarper::mRStart
private

Definition at line 117 of file TimeWarper.h.

Referenced by Warp().

◆ mScale

double LinearOutputRateTimeWarper::mScale
private

Definition at line 119 of file TimeWarper.h.

Referenced by Warp().

◆ mTimeWarper

LinearTimeWarper LinearOutputRateTimeWarper::mTimeWarper
private

Definition at line 116 of file TimeWarper.h.

Referenced by Warp().

◆ mTStart

double LinearOutputRateTimeWarper::mTStart
private

Definition at line 118 of file TimeWarper.h.

Referenced by Warp().


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