Audacity 3.2.0
Classes | Public Member Functions | Public Attributes | List of all members
MixerOptions::Warp Struct Referencefinal

Immutable structure is an argument to Mixer's constructor. More...

#include <MixerOptions.h>

Collaboration diagram for MixerOptions::Warp:
[legend]

Classes

struct  DefaultWarp
 Hook function for default time warp. More...
 

Public Member Functions

 Warp (const AudacityProject *pProject)
 Construct using the default warp function. More...
 
 Warp (const BoundedEnvelope *e)
 Construct with an explicit warp. More...
 
 Warp (double min, double max, double initial=1.0)
 Construct with no time warp. More...
 

Public Attributes

const BoundedEnvelope *const envelope = nullptr
 
const double minSpeed
 
const double maxSpeed
 
const double initialSpeed { 1.0 }
 

Detailed Description

Immutable structure is an argument to Mixer's constructor.

Definition at line 56 of file MixerOptions.h.

Constructor & Destructor Documentation

◆ Warp() [1/3]

MixerOptions::Warp::Warp ( const AudacityProject pProject)
explicit

Construct using the default warp function.

Definition at line 18 of file MixerOptions.cpp.

19: envelope(DefaultWarp::Call(pProject)), minSpeed(0.0), maxSpeed(0.0)
20{
21}
static result_type Call(Arguments &&...arguments)
Null check of the installed function is done for you.
const BoundedEnvelope *const envelope
Definition: MixerOptions.h:76
const double maxSpeed
Definition: MixerOptions.h:77
const double minSpeed
Definition: MixerOptions.h:77

◆ Warp() [2/3]

MixerOptions::Warp::Warp ( const BoundedEnvelope e)
explicit

Construct with an explicit warp.

Definition at line 23 of file MixerOptions.cpp.

24 : envelope(e), minSpeed(0.0), maxSpeed(0.0)
25 {}

◆ Warp() [3/3]

MixerOptions::Warp::Warp ( double  min,
double  max,
double  initial = 1.0 
)

Construct with no time warp.

Precondition
min >= 0
max >= 0
min <= max

Definition at line 27 of file MixerOptions.cpp.

28 : minSpeed{ std::max(0.0, std::min(min, max)) }
29 , maxSpeed{ std::max(0.0, std::max(min, max)) }
30 , initialSpeed{initial}
31{
32 assert(min >= 0);
33 assert(max >= 0);
34 assert(min <= max);
35}
int min(int a, int b)
const double initialSpeed
Definition: MixerOptions.h:78

References min().

Here is the call graph for this function:

Member Data Documentation

◆ envelope

const BoundedEnvelope* const MixerOptions::Warp::envelope = nullptr

Definition at line 76 of file MixerOptions.h.

Referenced by MixerOptions::ResampleParameters::ResampleParameters().

◆ initialSpeed

const double MixerOptions::Warp::initialSpeed { 1.0 }

Definition at line 78 of file MixerOptions.h.

◆ maxSpeed

const double MixerOptions::Warp::maxSpeed

Definition at line 77 of file MixerOptions.h.

Referenced by MixerOptions::ResampleParameters::ResampleParameters().

◆ minSpeed

const double MixerOptions::Warp::minSpeed

Definition at line 77 of file MixerOptions.h.

Referenced by MixerOptions::ResampleParameters::ResampleParameters().


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