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

Unit slope but with either a jump (pasting more) or a flat interval (pasting less) More...

#include <TimeWarper.h>

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

Public Member Functions

 PasteTimeWarper (double oldT1, double newT1)
 
double Warp (double originalTime) const override
 
- Public Member Functions inherited from TimeWarper
virtual ~TimeWarper ()
 
virtual double Warp (double originalTime) const =0
 

Private Attributes

const double mOldT1
 
const double mNewT1
 

Detailed Description

Unit slope but with either a jump (pasting more) or a flat interval (pasting less)

Definition at line 180 of file TimeWarper.h.

Constructor & Destructor Documentation

◆ PasteTimeWarper()

PasteTimeWarper::PasteTimeWarper ( double  oldT1,
double  newT1 
)

Definition at line 141 of file TimeWarper.cpp.

142: mOldT1{ oldT1 }, mNewT1{ newT1 }
143{ }
const double mNewT1
Definition: TimeWarper.h:183
const double mOldT1
Definition: TimeWarper.h:183

Member Function Documentation

◆ Warp()

double PasteTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 145 of file TimeWarper.cpp.

146{
147 if (originalTime < mOldT1)
148 return std::min(originalTime, mNewT1);
149 else
150 return originalTime + mNewT1 - mOldT1;
151}
int min(int a, int b)

References min(), mNewT1, and mOldT1.

Here is the call graph for this function:

Member Data Documentation

◆ mNewT1

const double PasteTimeWarper::mNewT1
private

Definition at line 183 of file TimeWarper.h.

Referenced by Warp().

◆ mOldT1

const double PasteTimeWarper::mOldT1
private

Definition at line 183 of file TimeWarper.h.

Referenced by Warp().


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