Definition at line 12 of file ProjectTempoListener.cpp.
◆ ProjectTempoListener()
Definition at line 34 of file ProjectTempoListener.cpp.
43 {
44 const auto tempo = ProjectTimeSignature::Get(mProject).GetTempo();
45 if (const auto track = event.mpTrack.lock())
46 DoProjectTempoChange(*track, tempo);
47 }
48 }) }
49{
54 });
56}
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
Observer::Subscription mProjectTimeSignatureSubscription
void OnProjectTempoChange(double newTempo)
AudacityProject & mProject
Observer::Subscription mTrackListSubstription
static ProjectTimeSignature & Get(AudacityProject &project)
static ViewInfo & Get(AudacityProject &project)
Notification of changes in individual tracks of TrackList, or of TrackList's composition.
@ ADDITION
Posted when a track has been added to a tracklist. Also posted when one track replaces another.
References TrackListEvent::ADDITION, DoProjectTempoChange(), ProjectTimeSignature::Get(), ProjectTimeSignature::GetTempo(), and mProject.
◆ OnProjectTempoChange()
void ProjectTempoListener::OnProjectTempoChange |
( |
double |
newTempo | ) |
|
Definition at line 58 of file ProjectTempoListener.cpp.
59{
62
64 {
65 const auto tempoRate =
mTempo / newTempo;
69 );
70 }
72}
void DoProjectTempoChange(ChannelGroup &group, double newTempo)
void SetTimes(double start, double end)
References DoProjectTempoChange(), PlayRegion::Empty(), PlayRegion::GetEnd(), PlayRegion::GetStart(), mTempo, mTrackList, mViewInfo, ViewInfo::playRegion, and PlayRegion::SetTimes().
◆ mProject
◆ mProjectTimeSignatureSubscription
◆ mTempo
double ProjectTempoListener::mTempo { 0 } |
|
private |
◆ mTrackList
◆ mTrackListSubstription
◆ mViewInfo
ViewInfo& ProjectTempoListener::mViewInfo |
|
private |
The documentation for this class was generated from the following file: