Audacity 3.2.0
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
DefaultPlaybackPolicy Class Referencefinal

The PlaybackPolicy used by Audacity for most playback. More...

#include <DefaultPlaybackPolicy.h>

Inheritance diagram for DefaultPlaybackPolicy:
[legend]
Collaboration diagram for DefaultPlaybackPolicy:
[legend]

Classes

struct  SlotData
 

Public Member Functions

 DefaultPlaybackPolicy (AudacityProject &project, double trackEndTime, double loopEndTime, std::optional< double > pStartTime, bool loopEnabled, bool variableSpeed)
 
 ~DefaultPlaybackPolicy () override
 
void Initialize (PlaybackSchedule &schedule, double rate) override
 Called before starting an audio stream. More...
 
Mixer::WarpOptions MixerWarpOptions (PlaybackSchedule &schedule) override
 Options to use when constructing mixers for each playback track. More...
 
BufferTimes SuggestedBufferTimes (PlaybackSchedule &schedule) override
 Provide hints for construction of playback RingBuffer objects. More...
 
bool Done (PlaybackSchedule &schedule, unsigned long) override
 Returns true if schedule.GetSequenceTime() has reached the end of playback. More...
 
double OffsetSequenceTime (PlaybackSchedule &schedule, double offset) override
 Called when the play head needs to jump a certain distance. More...
 
PlaybackSlice GetPlaybackSlice (PlaybackSchedule &schedule, size_t available) override
 Choose length of one fetch of samples from tracks in a call to AudioIO::FillPlayBuffers. More...
 
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. More...
 
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 speed. More...
 
bool Looping (const PlaybackSchedule &) const override
 
- Public Member Functions inherited from PlaybackPolicy
virtual ~PlaybackPolicy ()=0
 
virtual void Initialize (PlaybackSchedule &schedule, double rate)
 Called before starting an audio stream. More...
 
virtual void Finalize (PlaybackSchedule &schedule)
 Called after stopping of an audio stream or an unsuccessful start. More...
 
virtual Mixer::WarpOptions MixerWarpOptions (PlaybackSchedule &schedule)
 Options to use when constructing mixers for each playback track. More...
 
virtual BufferTimes SuggestedBufferTimes (PlaybackSchedule &schedule)
 Provide hints for construction of playback RingBuffer objects. More...
 
virtual bool AllowSeek (PlaybackSchedule &schedule)
 Whether repositioning commands are allowed during playback. More...
 
virtual bool Done (PlaybackSchedule &schedule, unsigned long outputFrames)
 Returns true if schedule.GetSequenceTime() has reached the end of playback. More...
 
virtual double OffsetSequenceTime (PlaybackSchedule &schedule, double offset)
 Called when the play head needs to jump a certain distance. More...
 
virtual std::chrono::milliseconds SleepInterval (PlaybackSchedule &schedule)
 How long to wait between calls to AudioIO::SequenceBufferExchange. More...
 
virtual PlaybackSlice GetPlaybackSlice (PlaybackSchedule &schedule, size_t available)
 Choose length of one fetch of samples from tracks in a call to AudioIO::FillPlayBuffers. More...
 
virtual std::pair< double, double > AdvancedTrackTime (PlaybackSchedule &schedule, double trackTime, size_t nSamples)
 Compute a new point in a track's timeline from an old point and a real duration. More...
 
virtual bool RepositionPlayback (PlaybackSchedule &schedule, const Mixers &playbackMixers, size_t frames, size_t available)
 AudioIO::FillPlayBuffers calls this to update its cursors into tracks for changes of position or speed. More...
 
virtual bool Looping (const PlaybackSchedule &schedule) const
 

Private Member Functions

bool RevertToOldDefault (const PlaybackSchedule &schedule) const
 
void WriteMessage ()
 
double GetPlaySpeed ()
 

Private Attributes

AudacityProjectmProject
 
MessageBuffer< SlotDatamMessageChannel
 
Observer::Subscription mRegionSubscription
 
Observer::Subscription mSpeedSubscription
 
double mLastPlaySpeed { 1.0 }
 
const double mTrackEndTime
 
double mLoopEndTime
 
std::optional< double > mpStartTime
 
size_t mRemaining { 0 }
 
bool mProgress { true }
 
bool mLoopEnabled { true }
 
bool mVariableSpeed { false }
 

Additional Inherited Members

- Public Types inherited from PlaybackPolicy
using Duration = std::chrono::duration< double >
 
using Mixers = std::vector< std::unique_ptr< Mixer > >
 
- Protected Attributes inherited from PlaybackPolicy
double mRate = 0
 

Detailed Description

The PlaybackPolicy used by Audacity for most playback.

It subscribes to messages from ViewInfo and PlayRegion for loop bounds adjustment. Therefore it is not a low-level class that can be defined with the playback engine.

Definition at line 20 of file DefaultPlaybackPolicy.h.

Constructor & Destructor Documentation

◆ DefaultPlaybackPolicy()

DefaultPlaybackPolicy::DefaultPlaybackPolicy ( AudacityProject project,
double  trackEndTime,
double  loopEndTime,
std::optional< double >  pStartTime,
bool  loopEnabled,
bool  variableSpeed 
)

Definition at line 16 of file DefaultPlaybackPolicy.cpp.

19 : mProject{ project }
20 , mTrackEndTime{ trackEndTime }
21 , mLoopEndTime{ loopEndTime }
22 , mpStartTime{ pStartTime }
23 , mLoopEnabled{ loopEnabled }
24 , mVariableSpeed{ variableSpeed }
25{}
const auto project
AudacityProject & mProject
std::optional< double > mpStartTime

◆ ~DefaultPlaybackPolicy()

DefaultPlaybackPolicy::~DefaultPlaybackPolicy ( )
overridedefault

Member Function Documentation

◆ AdvancedTrackTime()

std::pair< double, double > DefaultPlaybackPolicy::AdvancedTrackTime ( PlaybackSchedule schedule,
double  trackTime,
size_t  nSamples 
)
overridevirtual

Compute a new point in a track's timeline from an old point and a real duration.

Needed because playback might be at non-unit speed.

Called one or more times between GetPlaybackSlice and RepositionPlayback, until the sum of the nSamples values equals the most recent playback slice (including any trailing silence).

Returns
a pair, which indicates a discontinuous jump when its members are not equal, or specially the end of playback when the second member is infinite

Reimplemented from PlaybackPolicy.

Definition at line 146 of file DefaultPlaybackPolicy.cpp.

148{
149 bool revert = RevertToOldDefault(schedule);
150 if (!mVariableSpeed && revert)
151 return PlaybackPolicy::AdvancedTrackTime(schedule, trackTime, nSamples);
152
153 mRemaining -= std::min(mRemaining, nSamples);
154 if ( mRemaining == 0 && !revert )
155 // Wrap to start
156 return { schedule.mT1, schedule.mT0 };
157
158 // Defense against cases that might cause loops not to terminate
159 if ( fabs(schedule.mT0 - schedule.mT1) < 1e-9 )
160 return {schedule.mT0, schedule.mT0};
161
162 auto realDuration = (nSamples / mRate) * mLastPlaySpeed;
163 if (schedule.ReversedTime())
164 realDuration *= -1.0;
165
166 if (schedule.mEnvelope)
167 trackTime =
168 schedule.SolveWarpedLength(trackTime, realDuration);
169 else
170 trackTime += realDuration;
171
172 return { trackTime, trackTime };
173}
int min(int a, int b)
bool RevertToOldDefault(const PlaybackSchedule &schedule) const
virtual std::pair< double, double > AdvancedTrackTime(PlaybackSchedule &schedule, double trackTime, size_t nSamples)
Compute a new point in a track's timeline from an old point and a real duration.
double mT0
Playback starts at offset of mT0, which is measured in seconds.
double mT1
Playback ends at offset of mT1, which is measured in seconds. Note that mT1 may be less than mT0 duri...
double SolveWarpedLength(double t0, double length) const
Compute how much unwarped time must have elapsed if length seconds of warped time has elapsed,...
bool ReversedTime() const
True if the end time is before the start time.
const BoundedEnvelope * mEnvelope

References PlaybackPolicy::AdvancedTrackTime(), PlaybackSchedule::mEnvelope, min(), mLastPlaySpeed, PlaybackPolicy::mRate, mRemaining, PlaybackSchedule::mT0, PlaybackSchedule::mT1, mVariableSpeed, PlaybackSchedule::ReversedTime(), RevertToOldDefault(), and PlaybackSchedule::SolveWarpedLength().

Here is the call graph for this function:

◆ Done()

bool DefaultPlaybackPolicy::Done ( PlaybackSchedule schedule,
unsigned long  outputFrames 
)
overridevirtual

Returns true if schedule.GetSequenceTime() has reached the end of playback.

Parameters
outputFrameshow many playback frames were taken from RingBuffers

Reimplemented from PlaybackPolicy.

Definition at line 70 of file DefaultPlaybackPolicy.cpp.

72{
73 if (RevertToOldDefault(schedule)) {
74 auto diff = schedule.GetSequenceTime() - schedule.mT1;
75 if (schedule.ReversedTime())
76 diff *= -1;
77 return sampleCount(floor(diff * mRate + 0.5)) >= 0;
78 }
79 return false;
80}
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
double GetSequenceTime() const
Get current track time value, unadjusted.

References PlaybackSchedule::GetSequenceTime(), PlaybackPolicy::mRate, PlaybackSchedule::mT1, PlaybackSchedule::ReversedTime(), and RevertToOldDefault().

Here is the call graph for this function:

◆ GetPlaybackSlice()

PlaybackSlice DefaultPlaybackPolicy::GetPlaybackSlice ( PlaybackSchedule schedule,
size_t  available 
)
overridevirtual

Choose length of one fetch of samples from tracks in a call to AudioIO::FillPlayBuffers.

Parameters
availableupper bound for the length of the fetch

Reimplemented from PlaybackPolicy.

Definition at line 107 of file DefaultPlaybackPolicy.cpp.

109{
110 // How many samples to produce for each channel.
111 const auto realTimeRemaining = std::max(0.0, schedule.RealTimeRemaining());
112 mRemaining = realTimeRemaining * mRate / mLastPlaySpeed;
113
114 auto frames = available;
115 auto toProduce = frames;
116 double deltat = (frames / mRate) * mLastPlaySpeed;
117
118 if (deltat > realTimeRemaining) {
119 toProduce = frames = 0.5 + (realTimeRemaining * mRate) / mLastPlaySpeed;
120 auto realTime = realTimeRemaining;
121 double extra = 0;
122 if (RevertToOldDefault(schedule)) {
123 // Produce some extra silence so that the time queue consumer can
124 // satisfy its end condition
125 const double extraRealTime =
127 extra = std::min( extraRealTime, deltat - realTimeRemaining );
128 frames = ((realTimeRemaining + extra) * mRate) / mLastPlaySpeed;
129 }
130 schedule.RealTimeAdvance( realTimeRemaining + extra );
131 }
132 else
133 schedule.RealTimeAdvance( deltat );
134
135 // Don't fall into an infinite loop, if loop-playing a selection
136 // that is so short, it has no samples: detect that case
137 if (frames == 0) {
138 bool progress = (schedule.mWarpedTime != 0.0);
139 if (!progress)
140 // Cause FillPlayBuffers to make progress, filling all available with 0
141 frames = available, toProduce = 0;
142 }
143 return { available, frames, toProduce };
144}
constexpr size_t TimeQueueGrainSize
double RealTimeRemaining() const
void RealTimeAdvance(double increment)

References min(), mLastPlaySpeed, PlaybackPolicy::mRate, mRemaining, PlaybackSchedule::mWarpedTime, PlaybackSchedule::RealTimeAdvance(), PlaybackSchedule::RealTimeRemaining(), RevertToOldDefault(), and TimeQueueGrainSize.

Here is the call graph for this function:

◆ GetPlaySpeed()

double DefaultPlaybackPolicy::GetPlaySpeed ( )
private

Definition at line 286 of file DefaultPlaybackPolicy.cpp.

287{
288 return mVariableSpeed
290 : 1.0;
291}
double GetPlaySpeed() const
static ProjectAudioIO & Get(AudacityProject &project)

References ProjectAudioIO::Get(), ProjectAudioIO::GetPlaySpeed(), mProject, and mVariableSpeed.

Referenced by Initialize(), MixerWarpOptions(), and WriteMessage().

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

◆ Initialize()

void DefaultPlaybackPolicy::Initialize ( PlaybackSchedule schedule,
double  rate 
)
overridevirtual

Called before starting an audio stream.

Reimplemented from PlaybackPolicy.

Definition at line 29 of file DefaultPlaybackPolicy.cpp.

31{
32 PlaybackPolicy::Initialize(schedule, rate);
35 schedule.mT0, mLoopEndTime, mLoopEnabled } );
36
37 auto callback = [this](auto&){ WriteMessage(); };
42}
MessageBuffer< SlotData > mMessageChannel
Observer::Subscription mSpeedSubscription
Observer::Subscription mRegionSubscription
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
Definition: Observer.h:199
virtual void Initialize(PlaybackSchedule &schedule, double rate)
Called before starting an audio stream.
PlayRegion playRegion
Definition: ViewInfo.h:217
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235

References ProjectAudioIO::Get(), ViewInfo::Get(), GetPlaySpeed(), PlaybackPolicy::Initialize(), mLastPlaySpeed, mLoopEnabled, mLoopEndTime, mMessageChannel, mProject, mRegionSubscription, mSpeedSubscription, PlaybackSchedule::mT0, mVariableSpeed, ViewInfo::playRegion, Observer::Publisher< Message, NotifyAll >::Subscribe(), and WriteMessage().

Here is the call graph for this function:

◆ Looping()

bool DefaultPlaybackPolicy::Looping ( const PlaybackSchedule schedule) const
overridevirtual

be removed

Reimplemented from PlaybackPolicy.

Definition at line 273 of file DefaultPlaybackPolicy.cpp.

274{
275 return mLoopEnabled;
276}

References mLoopEnabled.

◆ MixerWarpOptions()

Mixer::WarpOptions DefaultPlaybackPolicy::MixerWarpOptions ( PlaybackSchedule schedule)
overridevirtual

Options to use when constructing mixers for each playback track.

Reimplemented from PlaybackPolicy.

Definition at line 44 of file DefaultPlaybackPolicy.cpp.

46{
48 // Enable variable rate mixing
49 return Mixer::WarpOptions(0.01, 32.0, GetPlaySpeed());
50 else
51 return PlaybackPolicy::MixerWarpOptions(schedule);
52}
MixerOptions::Warp WarpOptions
Definition: Mix.h:33
virtual Mixer::WarpOptions MixerWarpOptions(PlaybackSchedule &schedule)
Options to use when constructing mixers for each playback track.

References GetPlaySpeed(), PlaybackPolicy::MixerWarpOptions(), and mVariableSpeed.

Here is the call graph for this function:

◆ OffsetSequenceTime()

double DefaultPlaybackPolicy::OffsetSequenceTime ( PlaybackSchedule schedule,
double  offset 
)
overridevirtual

Called when the play head needs to jump a certain distance.

Parameters
offsetsigned amount requested to be added to schedule::GetSequenceTime()
Returns
the new value that will be set as the schedule's track time

Reimplemented from PlaybackPolicy.

Definition at line 82 of file DefaultPlaybackPolicy.cpp.

84{
85 auto time = schedule.GetSequenceTime();
86
87 // Assuming that mpStartTime always has a value when this policy is used
88 if (mpStartTime) {
89 if (mLoopEnabled) {
90 if (time < schedule.mT0)
91 time = std::clamp(time + offset, *mpStartTime, schedule.mT1);
92 else
93 time = std::clamp(time + offset, schedule.mT0, schedule.mT1);
94 }
95 else {
96 // this includes the case where the start time is after the
97 // looped region, and mLoopEnabled is set to false
98 time = std::clamp(time + offset, *mpStartTime, schedule.mT1);
99 }
100 }
101
102 schedule.RealTimeInit(time);
103 return time;
104}
void RealTimeInit(double trackTime)

References PlaybackSchedule::GetSequenceTime(), mLoopEnabled, mpStartTime, PlaybackSchedule::mT0, PlaybackSchedule::mT1, and PlaybackSchedule::RealTimeInit().

Here is the call graph for this function:

◆ RepositionPlayback()

bool DefaultPlaybackPolicy::RepositionPlayback ( PlaybackSchedule schedule,
const Mixers playbackMixers,
size_t  frames,
size_t  available 
)
overridevirtual

AudioIO::FillPlayBuffers calls this to update its cursors into tracks for changes of position or speed.

Returns
if true, AudioIO::FillPlayBuffers stops producing samples even if space remains
Parameters
frameshow many samples were just now buffered for play
availablehow many more samples may be buffered

Reimplemented from PlaybackPolicy.

Definition at line 175 of file DefaultPlaybackPolicy.cpp.

178{
179 // This executes in the SequenceBufferExchange thread
180 auto data = mMessageChannel.Read();
181
182 bool speedChange = false;
183 if (mVariableSpeed) {
184 speedChange = (mLastPlaySpeed != data.mPlaySpeed);
185 mLastPlaySpeed = data.mPlaySpeed;
186 }
187
188 bool empty = (data.mT0 >= data.mT1);
189 bool kicked = false;
190
191 // Amount in seconds by which right boundary can be moved left of the play
192 // head, yet loop play in progress will still capture the head
193 constexpr auto allowance = 0.5;
194
195 // Looping may become enabled if the main thread said so, but require too
196 // that the loop region is non-empty and the play head is not far to its
197 // right
198 bool loopWasEnabled = !RevertToOldDefault(schedule);
199 mLoopEnabled = data.mLoopEnabled && !empty &&
200 schedule.mTimeQueue.GetLastTime() <= data.mT1 + allowance;
201
202 // Four cases: looping transitions off, or transitions on, or stays on,
203 // or stays off.
204 // Besides which, the variable speed slider may have changed.
205
206 // If looping transitions on, or remains on and the region changed,
207 // adjust the schedule...
208 auto mine = std::tie(schedule.mT0, mLoopEndTime);
209 auto theirs = std::tie(data.mT0, data.mT1);
210 if ((loopWasEnabled != mLoopEnabled) || (mLoopEnabled && mine != theirs))
211 {
212 kicked = true;
213 if (!empty) {
214 mine = theirs;
215 schedule.mT1 = data.mT1;
216 }
217 if (!mLoopEnabled)
218 // Continue play to the end
219 schedule.mT1 = std::max(schedule.mT0, mTrackEndTime);
220 schedule.mWarpedLength = schedule.RealDuration(schedule.mT1);
221
222 auto newTime = schedule.mTimeQueue.GetLastTime();
223#if 0
224 // This would make play jump forward or backward into the adjusted
225 // looping region if not already in it
226 newTime = std::clamp(newTime, schedule.mT0, schedule.mT1);
227#endif
228
229 if (newTime >= schedule.mT1 && mLoopEnabled)
230 newTime = schedule.mT0;
231
232 // So that the play head will redraw in the right place:
233 schedule.mTimeQueue.SetLastTime(newTime);
234
235 schedule.RealTimeInit(newTime);
236 const auto realTimeRemaining = std::max(0.0, schedule.RealTimeRemaining());
237 mRemaining = realTimeRemaining * mRate / mLastPlaySpeed;
238 }
239 else if (speedChange)
240 // Don't return early
241 kicked = true;
242 else {
243 // ... else the region did not change, or looping is now off, in
244 // which case we have nothing special to do
245 if (RevertToOldDefault(schedule))
246 return PlaybackPolicy::RepositionPlayback( schedule, playbackMixers,
247 frames, available);
248 }
249
250 // msmeyer: If playing looped, check if we are at the end of the buffer
251 // and if yes, restart from the beginning.
252 if (mRemaining <= 0)
253 {
254 // Looping jumps left
255 for (auto &pMixer : playbackMixers)
256 pMixer->SetTimesAndSpeed(
257 schedule.mT0, schedule.mT1, mLastPlaySpeed, true );
258 schedule.RealTimeRestart();
259 }
260 else if (kicked)
261 {
262 // Play bounds need redefinition
263 const auto time = schedule.mTimeQueue.GetLastTime();
264 for (auto &pMixer : playbackMixers) {
265 // So that the mixer will fetch the next samples from the right place:
266 pMixer->SetTimesAndSpeed( time, schedule.mT1, mLastPlaySpeed );
267 pMixer->Reposition(time, true);
268 }
269 }
270 return false;
271}
virtual bool RepositionPlayback(PlaybackSchedule &schedule, const Mixers &playbackMixers, size_t frames, size_t available)
AudioIO::FillPlayBuffers calls this to update its cursors into tracks for changes of position or spee...
double GetLastTime() const
Return the last time saved by Producer.
double RealDuration(double trackTime1) const
class AUDIO_IO_API PlaybackSchedule::TimeQueue mTimeQueue

References PlaybackSchedule::TimeQueue::GetLastTime(), mLastPlaySpeed, mLoopEnabled, mLoopEndTime, mMessageChannel, PlaybackPolicy::mRate, mRemaining, PlaybackSchedule::mT0, PlaybackSchedule::mT1, PlaybackSchedule::mTimeQueue, mTrackEndTime, mVariableSpeed, PlaybackSchedule::mWarpedLength, PlaybackSchedule::RealDuration(), PlaybackSchedule::RealTimeInit(), PlaybackSchedule::RealTimeRemaining(), PlaybackSchedule::RealTimeRestart(), PlaybackPolicy::RepositionPlayback(), RevertToOldDefault(), and PlaybackSchedule::TimeQueue::SetLastTime().

Here is the call graph for this function:

◆ RevertToOldDefault()

bool DefaultPlaybackPolicy::RevertToOldDefault ( const PlaybackSchedule schedule) const
private

Definition at line 63 of file DefaultPlaybackPolicy.cpp.

64{
65 return !mLoopEnabled ||
66 // Even if loop is enabled, ignore it if right of looping region
68}

References PlaybackSchedule::TimeQueue::GetLastTime(), mLoopEnabled, mLoopEndTime, and PlaybackSchedule::mTimeQueue.

Referenced by AdvancedTrackTime(), Done(), GetPlaybackSlice(), and RepositionPlayback().

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

◆ SuggestedBufferTimes()

PlaybackPolicy::BufferTimes DefaultPlaybackPolicy::SuggestedBufferTimes ( PlaybackSchedule schedule)
overridevirtual

Provide hints for construction of playback RingBuffer objects.

Reimplemented from PlaybackPolicy.

Definition at line 55 of file DefaultPlaybackPolicy.cpp.

56{
57 // Shorter times than in the default policy so that responses to changes of
58 // loop region or speed slider don't lag too much
59 using namespace std::chrono;
60 return { 0.05s, 0.05s, 0.25s };
61}

◆ WriteMessage()

void DefaultPlaybackPolicy::WriteMessage ( )
private

Definition at line 278 of file DefaultPlaybackPolicy.cpp.

279{
280 const auto &region = ViewInfo::Get( mProject ).playRegion;
281 mMessageChannel.Write( { GetPlaySpeed(),
282 region.GetStart(), region.GetEnd(), region.Active()
283 } );
284}

References ViewInfo::Get(), GetPlaySpeed(), mMessageChannel, mProject, and ViewInfo::playRegion.

Referenced by Initialize().

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

Member Data Documentation

◆ mLastPlaySpeed

double DefaultPlaybackPolicy::mLastPlaySpeed { 1.0 }
private

◆ mLoopEnabled

bool DefaultPlaybackPolicy::mLoopEnabled { true }
private

◆ mLoopEndTime

double DefaultPlaybackPolicy::mLoopEndTime
private

Definition at line 75 of file DefaultPlaybackPolicy.h.

Referenced by Initialize(), RepositionPlayback(), and RevertToOldDefault().

◆ mMessageChannel

MessageBuffer<SlotData> DefaultPlaybackPolicy::mMessageChannel
private

Definition at line 68 of file DefaultPlaybackPolicy.h.

Referenced by Initialize(), RepositionPlayback(), and WriteMessage().

◆ mProgress

bool DefaultPlaybackPolicy::mProgress { true }
private

Definition at line 78 of file DefaultPlaybackPolicy.h.

◆ mProject

AudacityProject& DefaultPlaybackPolicy::mProject
private

Definition at line 58 of file DefaultPlaybackPolicy.h.

Referenced by GetPlaySpeed(), Initialize(), and WriteMessage().

◆ mpStartTime

std::optional<double> DefaultPlaybackPolicy::mpStartTime
private

Definition at line 76 of file DefaultPlaybackPolicy.h.

Referenced by OffsetSequenceTime().

◆ mRegionSubscription

Observer::Subscription DefaultPlaybackPolicy::mRegionSubscription
private

Definition at line 70 of file DefaultPlaybackPolicy.h.

Referenced by Initialize().

◆ mRemaining

size_t DefaultPlaybackPolicy::mRemaining { 0 }
private

Definition at line 77 of file DefaultPlaybackPolicy.h.

Referenced by AdvancedTrackTime(), GetPlaybackSlice(), and RepositionPlayback().

◆ mSpeedSubscription

Observer::Subscription DefaultPlaybackPolicy::mSpeedSubscription
private

Definition at line 71 of file DefaultPlaybackPolicy.h.

Referenced by Initialize().

◆ mTrackEndTime

const double DefaultPlaybackPolicy::mTrackEndTime
private

Definition at line 74 of file DefaultPlaybackPolicy.h.

Referenced by RepositionPlayback().

◆ mVariableSpeed

bool DefaultPlaybackPolicy::mVariableSpeed { false }
private

The documentation for this class was generated from the following files: