1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

split out function AdvancedTrackTime; more caution about termination

This commit is contained in:
Paul Licameli
2018-08-11 23:41:45 -04:00
parent 84c8aa0fcc
commit 67a9823434
2 changed files with 29 additions and 14 deletions

View File

@@ -954,6 +954,13 @@ private:
// Returns true if time equals t1 or is on opposite side of t1, to t0
bool Overruns( double trackTime ) const;
// Compute the NEW track time for the given one and a real duration,
// taking into account whether the schedule is for looping
double AdvancedTrackTime(
double trackTime, double realElapsed, double speed) const;
// Use the function above in the callback after consuming samples from the
// playback ring buffers, during usual straight or looping play
void TrackTimeUpdate(double realElapsed);
// Convert a nonnegative real duration to an increment of track time