Audacity 3.2.0
Classes | Namespaces | Functions | Variables
TempoChange.cpp File Reference
#include "TempoChange.h"
#include "Channel.h"
Include dependency graph for TempoChange.cpp:

Go to the source code of this file.

Classes

struct  anonymous_namespace{TempoChange.cpp}::ProjectTempo
 

Namespaces

namespace  anonymous_namespace{TempoChange.cpp}
 

Functions

void DoProjectTempoChange (ChannelGroup &group, double newTempo)
 
const std::optional< double > & GetProjectTempo (const ChannelGroup &group)
 
 DEFINE_ATTACHED_VIRTUAL (OnProjectTempoChange)
 

Variables

const ChannelGroup::Attachments::RegisteredFactory anonymous_namespace{TempoChange.cpp}::projectTempoDataFactory
 

Function Documentation

◆ DEFINE_ATTACHED_VIRTUAL()

DEFINE_ATTACHED_VIRTUAL ( OnProjectTempoChange  )

Definition at line 53 of file TempoChange.cpp.

53 {
54 return [](auto&, auto&, auto){ };
55}

◆ DoProjectTempoChange()

void DoProjectTempoChange ( ChannelGroup group,
double  newTempo 
)

Definition at line 41 of file TempoChange.cpp.

42{
43 auto &oldTempo = ProjectTempo::Get(group).mProjectTempo;
44 OnProjectTempoChange::Call(group, oldTempo, newTempo);
45 oldTempo = newTempo;
46}
static Return Call(This &obj, Arguments ...arguments)
Invoke the method – but only after static initialization time.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:202

References AttachedVirtualFunction< Tag, Return, This, Arguments >::Call(), and BasicUI::Get().

Referenced by ProjectFileManager::DoImport(), WaveTrack::DuplicateWithOtherTempo(), ProjectTempoListener::OnProjectTempoChange(), BenchmarkDialog::OnRun(), and ProjectTempoListener::ProjectTempoListener().

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

◆ GetProjectTempo()

const std::optional< double > & GetProjectTempo ( const ChannelGroup group)

Definition at line 48 of file TempoChange.cpp.

49{
50 return ProjectTempo::Get(group).mProjectTempo;
51}

References BasicUI::Get().

Referenced by WaveTrack::ClearAndPaste(), WaveTrack::ClearAndPasteAtSameTempo(), WaveTrack::DoCreateClip(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), WaveTrack::InsertClip(), WaveTrack::PasteWaveTrack(), and WaveTrack::PasteWaveTrackAtSameTempo().

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