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:
Collaboration diagram for ShiftTimeWarper:

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 

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

Definition at line 82 of file TimeWarper.h.


Member Function Documentation

◆ Warp()

double ShiftTimeWarper::Warp ( double  originalTime) const

Implements TimeWarper.

Definition at line 31 of file TimeWarper.cpp.

33 return mWarper->Warp(originalTime + mShift);

References mShift, and mWarper.

Member Data Documentation

◆ mShift

double ShiftTimeWarper::mShift

Definition at line 78 of file TimeWarper.h.

Referenced by Warp().

◆ mWarper

std::unique_ptr<TimeWarper> ShiftTimeWarper::mWarper

Definition at line 77 of file TimeWarper.h.

Referenced by Warp().

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