10#ifndef __AUDACITY_DEFAULT_PLAYBACK_POLICY__
11#define __AUDACITY_DEFAULT_PLAYBACK_POLICY__
22 ,
public NonInterferingBase
26 double trackEndTime,
double loopEndTime, std::optional<double> pStartTime,
27 bool loopEnabled,
bool variableSpeed);
43 std::pair<double, double>
45 double trackTime,
size_t nSamples )
override;
49 size_t frames,
size_t available )
override;
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
The PlaybackPolicy used by Audacity for most playback.
PlaybackSlice GetPlaybackSlice(PlaybackSchedule &schedule, size_t available) override
Choose length of one fetch of samples from tracks in a call to AudioIO::FillPlayBuffers.
BufferTimes SuggestedBufferTimes(PlaybackSchedule &schedule) override
Provide hints for construction of playback RingBuffer objects.
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...
const double mTrackEndTime
void Initialize(PlaybackSchedule &schedule, double rate) override
Called before starting an audio stream.
MessageBuffer< SlotData > mMessageChannel
Observer::Subscription mSpeedSubscription
bool RevertToOldDefault(const PlaybackSchedule &schedule) const
Mixer::WarpOptions MixerWarpOptions(PlaybackSchedule &schedule) override
Options to use when constructing mixers for each playback track.
AudacityProject & mProject
std::optional< double > mpStartTime
~DefaultPlaybackPolicy() override
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.
Observer::Subscription mRegionSubscription
double OffsetSequenceTime(PlaybackSchedule &schedule, double offset) override
Called when the play head needs to jump a certain distance.
bool Looping(const PlaybackSchedule &) const override
DefaultPlaybackPolicy(AudacityProject &project, double trackEndTime, double loopEndTime, std::optional< double > pStartTime, bool loopEnabled, bool variableSpeed)
bool Done(PlaybackSchedule &schedule, unsigned long) override
Returns true if schedule.GetSequenceTime() has reached the end of playback.
Communicate data atomically from one writer thread to one reader.
A move-only handle representing a connection to a Publisher.
Directs which parts of tracks to fetch for playback.
std::vector< std::unique_ptr< Mixer > > Mixers
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.