Audacity  3.0.3
Functions
anonymous_namespace{Mix.cpp} Namespace Reference

Functions

double ComputeWarpFactor (const Envelope &env, double t0, double t1)
 Compute the integral warp factor between two non-warped time points. More...
 

Function Documentation

◆ ComputeWarpFactor()

double anonymous_namespace{Mix.cpp}::ComputeWarpFactor ( const Envelope env,
double  t0,
double  t1 
)

Compute the integral warp factor between two non-warped time points.

Calculate the relative length increase of the chosen segment from the original sound. So if this time track has a low value (i.e. makes the sound slower), the NEW warped sound will be longer than the original sound, so the return value of this function is larger.

Parameters
t0The starting time to calculate from
t1The ending time to calculate to
Returns
The relative length increase of the chosen segment from the original sound.

Definition at line 403 of file Mix.cpp.

404 {
405  return env.AverageOfInverse(t0, t1);
406 }

References Envelope::AverageOfInverse().

Referenced by Mixer::MixVariableRates().

Here is the call graph for this function:
Here is the caller graph for this function:
Envelope::AverageOfInverse
double AverageOfInverse(double t0, double t1) const
Definition: Envelope.cpp:1079