Audacity 3.2.0
Functions
anonymous_namespace{ClipTimeAndPitchSource.cpp} Namespace Reference

Functions

sampleCount GetLastReadSample (const ClipInterface &clip, double durationToDiscard, PlaybackDirection direction)
 

Detailed Description


Audacity: A Digital Audio Editor

ClipTimeAndPitchSource.cpp

Matthieu Hodgkinson

Function Documentation

◆ GetLastReadSample()

sampleCount anonymous_namespace{ClipTimeAndPitchSource.cpp}::GetLastReadSample ( const ClipInterface clip,
double  durationToDiscard,
PlaybackDirection  direction 
)

Definition at line 20 of file ClipTimeAndPitchSource.cpp.

23{
24 if (direction == PlaybackDirection::forward)
25 return sampleCount {
26 clip.GetRate() * durationToDiscard / clip.GetStretchRatio() + .5
27 };
28 else
29 return clip.GetVisibleSampleCount() - sampleCount {
30 clip.GetRate() * durationToDiscard / clip.GetStretchRatio() + .5
31 };
32}
virtual int GetRate() const =0
virtual double GetStretchRatio() const =0
virtual sampleCount GetVisibleSampleCount() const =0
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19

References forward, ClipTimes::GetRate(), ClipTimes::GetStretchRatio(), and ClipTimes::GetVisibleSampleCount().

Here is the call graph for this function: