Audacity  3.0.3
Functions
anonymous_namespace{AudioIOBase.cpp} Namespace Reference

Functions

double ComputeWarpedLength (const Envelope &env, double t0, double t1)
 Compute the duration (in seconds at playback) of the specified region of the track. More...
 
double SolveWarpedLength (const Envelope &env, double t0, double length)
 Compute how much unwarped time must have elapsed if length seconds of warped time has elapsed. More...
 

Function Documentation

◆ ComputeWarpedLength()

double anonymous_namespace{AudioIOBase.cpp}::ComputeWarpedLength ( const Envelope env,
double  t0,
double  t1 
)

Compute the duration (in seconds at playback) of the specified region of the track.

Takes a region of the time track (specified by the unwarped time points in the project), and calculates how long it will actually take to play this region back, taking the time track's warping effects into account.

Parameters
t0unwarped time to start calculation from
t1unwarped time to stop calculation at
Returns
the warped duration in seconds

Definition at line 1219 of file AudioIOBase.cpp.

1220 {
1221  return env.IntegralOfInverse(t0, t1);
1222 }

References Envelope::IntegralOfInverse().

Referenced by AudioIOBase::PlaybackSchedule::AdvancedTrackTime(), and AudioIOBase::PlaybackSchedule::RealDuration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SolveWarpedLength()

double anonymous_namespace{AudioIOBase.cpp}::SolveWarpedLength ( const Envelope env,
double  t0,
double  length 
)

Compute how much unwarped time must have elapsed if length seconds of warped time has elapsed.

Parameters
t0The unwarped time (seconds from project start) at which to start
lengthHow many seconds of warped time went past.
Returns
The end point (in seconds from project start) as unwarped time

Definition at line 1231 of file AudioIOBase.cpp.

1232 {
1233  return env.SolveIntegralOfInverse(t0, length);
1234 }

References Envelope::SolveIntegralOfInverse().

Referenced by AudioIOBase::PlaybackSchedule::AdvancedTrackTime().

Here is the call graph for this function:
Here is the caller graph for this function:
Envelope::IntegralOfInverse
double IntegralOfInverse(double t0, double t1) const
Definition: Envelope.cpp:1232
Envelope::SolveIntegralOfInverse
double SolveIntegralOfInverse(double t0, double area) const
Definition: Envelope.cpp:1295