11#ifndef __AUDACITY_SCRUB_STATE__
12#define __AUDACITY_SCRUB_STATE__
62 std::chrono::milliseconds
70 std::pair<double, double>
72 double trackTime,
size_t nSamples )
override;
static constexpr auto ScrubPollInterval
Directs which parts of tracks to fetch for playback.
std::vector< std::unique_ptr< Mixer > > Mixers
std::chrono::duration< double > Duration
const ScrubbingOptions mOptions
std::chrono::milliseconds SleepInterval(PlaybackSchedule &) override
How long to wait between calls to AudioIO::SequenceBufferExchange.
BufferTimes SuggestedBufferTimes(PlaybackSchedule &schedule) override
Provide hints for construction of playback RingBuffer objects.
void Finalize(PlaybackSchedule &schedule) override
Called after stopping of an audio stream or an unsuccessful start.
bool Done(PlaybackSchedule &schedule, unsigned long) override
Returns true if schedule.GetSequenceTime() has reached the end of playback.
bool RepositionPlayback(PlaybackSchedule &schedule, const Mixers &playbackMixers, size_t frames, size_t available) override
AudioIO::FillPlayBuffers calls this to update its cursors into tracks for changes of position or spee...
~ScrubbingPlaybackPolicy() override
sampleCount mScrubDuration
PlaybackSlice GetPlaybackSlice(PlaybackSchedule &schedule, size_t available) override
Choose length of one fetch of samples from tracks in a call to AudioIO::FillPlayBuffers.
size_t mUntilDiscontinuity
ScrubbingPlaybackPolicy(const ScrubbingOptions &)
Mixer::WarpOptions MixerWarpOptions(PlaybackSchedule &schedule) override
Options to use when constructing mixers for each playback track.
bool AllowSeek(PlaybackSchedule &) override
Whether repositioning commands are allowed during playback.
std::pair< double, double > AdvancedTrackTime(PlaybackSchedule &schedule, double trackTime, size_t nSamples) override
Compute a new point in a track's timeline from an old point and a real duration.
void Initialize(PlaybackSchedule &schedule, double rate) override
Called before starting an audio stream.
Positions or offsets within audio files need a wide type.
Immutable structure is an argument to Mixer's constructor.
Describes an amount of contiguous (but maybe time-warped) data to be extracted from tracks to play.
static bool IsScrubbing()
static double GetLastScrubTime()
return the ending time of the last scrub interval.
static void UpdateScrub(double endTimeOrSpeed, const ScrubbingOptions &options)
Notify scrubbing engine of desired position or speed. If options.adjustStart is true,...
PlaybackPolicy::Duration minStutterTime
PlaybackPolicy::Duration delay
static double MinAllowedScrubSpeed()
static double MaxAllowedScrubSpeed()