Audacity  3.0.3
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 ()
 

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 142 of file TimeWarper.cpp.

143 : mOldT1{ oldT1 }, mNewT1{ newT1 }
144 { }

Member Function Documentation

◆ Warp()

double PasteTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 146 of file TimeWarper.cpp.

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

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:
PasteTimeWarper::mNewT1
const double mNewT1
Definition: TimeWarper.h:183
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
PasteTimeWarper::mOldT1
const double mOldT1
Definition: TimeWarper.h:183