MCPcopy Create free account
hub / github.com/audacity/audacity / Initialize

Method Initialize

src/DefaultPlaybackPolicy.cpp:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27DefaultPlaybackPolicy::~DefaultPlaybackPolicy() = default;
28
29void DefaultPlaybackPolicy::Initialize(
30 PlaybackSchedule &schedule, double rate )
31{
32 PlaybackPolicy::Initialize(schedule, rate);
33 mLastPlaySpeed = GetPlaySpeed();
34 mMessageChannel.Write( { mLastPlaySpeed,
35 schedule.mT0, mLoopEndTime, mLoopEnabled } );
36
37 auto callback = [this](auto&){ WriteMessage(); };
38 mRegionSubscription =
39 ViewInfo::Get(mProject).playRegion.Subscribe(callback);
40 if (mVariableSpeed)
41 mSpeedSubscription = ProjectAudioIO::Get(mProject).Subscribe(callback);
42}
43
44Mixer::WarpOptions DefaultPlaybackPolicy::MixerWarpOptions(
45 PlaybackSchedule &schedule)

Callers

nothing calls this directly

Calls 5

GetPlaySpeedFunction · 0.85
GetFunction · 0.85
InitializeFunction · 0.70
WriteMethod · 0.45
SubscribeMethod · 0.45

Tested by

no test coverage detected