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

Behaves like another, given TimeWarper, except shifted by a fixed amount. More...

#include <TimeWarper.h>

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

Public Member Functions

 ShiftTimeWarper (std::unique_ptr< TimeWarper > &&warper, double shiftAmount)
 
virtual ~ShiftTimeWarper ()
 
double Warp (double originalTime) const override
 
- Public Member Functions inherited from TimeWarper
virtual ~TimeWarper ()
 
virtual double Warp (double originalTime) const =0
 

Private Attributes

std::unique_ptr< TimeWarpermWarper
 
double mShift
 

Detailed Description

Behaves like another, given TimeWarper, except shifted by a fixed amount.

Definition at line 74 of file TimeWarper.h.

Constructor & Destructor Documentation

◆ ShiftTimeWarper()

ShiftTimeWarper::ShiftTimeWarper ( std::unique_ptr< TimeWarper > &&  warper,
double  shiftAmount 
)
inline

Definition at line 80 of file TimeWarper.h.

81 : mWarper(std::move(warper)), mShift(shiftAmount) { }
std::unique_ptr< TimeWarper > mWarper
Definition: TimeWarper.h:77

◆ ~ShiftTimeWarper()

virtual ShiftTimeWarper::~ShiftTimeWarper ( )
inlinevirtual

Definition at line 82 of file TimeWarper.h.

82{}

Member Function Documentation

◆ Warp()

double ShiftTimeWarper::Warp ( double  originalTime) const
overridevirtual

Implements TimeWarper.

Definition at line 31 of file TimeWarper.cpp.

32{
33 return mWarper->Warp(originalTime + mShift);
34}

References mShift, and mWarper.

Member Data Documentation

◆ mShift

double ShiftTimeWarper::mShift
private

Definition at line 78 of file TimeWarper.h.

Referenced by Warp().

◆ mWarper

std::unique_ptr<TimeWarper> ShiftTimeWarper::mWarper
private

Definition at line 77 of file TimeWarper.h.

Referenced by Warp().


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