Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
anonymous_namespace{WaveTrack.cpp}::GainAndPan Struct Reference
Inheritance diagram for anonymous_namespace{WaveTrack.cpp}::GainAndPan:
[legend]
Collaboration diagram for anonymous_namespace{WaveTrack.cpp}::GainAndPan:
[legend]

Public Member Functions

 GainAndPan ()=default
 
 GainAndPan (const GainAndPan &)
 
GainAndPanoperator= (const GainAndPan &)=delete
 
 ~GainAndPan () override
 
std::unique_ptr< ClientData::Cloneable<> > Clone () const override
 
float GetGain () const
 
void SetGain (float value)
 
float GetPan () const
 
void SetPan (float value)
 
- Public Member Functions inherited from ClientData::Cloneable< Owner >
virtual ~Cloneable ()
 
virtual PointerType Clone () const =0
 

Static Public Member Functions

static GainAndPanGet (WaveTrack &track)
 
static const GainAndPanGet (const WaveTrack &track)
 

Private Attributes

std::atomic< float > mGain { 1.0f }
 Atomic because it may be read by worker threads in playback. More...
 
std::atomic< float > mPan { 0.0f }
 Atomic because it may be read by worker threads in playback. More...
 

Additional Inherited Members

- Public Types inherited from ClientData::Cloneable< Owner >
using Base = Cloneable
 
using PointerType = Owner< Base >
 

Detailed Description

Definition at line 65 of file WaveTrack.cpp.

Constructor & Destructor Documentation

◆ GainAndPan() [1/2]

anonymous_namespace{WaveTrack.cpp}::GainAndPan::GainAndPan ( )
default

◆ GainAndPan() [2/2]

anonymous_namespace{WaveTrack.cpp}::GainAndPan::GainAndPan ( const GainAndPan )

◆ ~GainAndPan()

anonymous_namespace{WaveTrack.cpp}::GainAndPan::~GainAndPan ( )
overridedefault

Member Function Documentation

◆ Clone()

std::unique_ptr< ClientData::Cloneable<> > anonymous_namespace{WaveTrack.cpp}::GainAndPan::Clone ( ) const
overridevirtual

Implements ClientData::Cloneable< Owner >.

Definition at line 98 of file WaveTrack.cpp.

98 {
99 return std::make_unique<GainAndPan>(*this);
100}

◆ Get() [1/2]

const GainAndPan & anonymous_namespace{WaveTrack.cpp}::GainAndPan::Get ( const WaveTrack track)
static

Definition at line 107 of file WaveTrack.cpp.

108{
109 return Get(const_cast<WaveTrack &>(track));
110}
A Track that contains audio waveform data.
Definition: WaveTrack.h:51
static GainAndPan & Get(WaveTrack &track)
Definition: WaveTrack.cpp:102

References BasicUI::Get().

Here is the call graph for this function:

◆ Get() [2/2]

GainAndPan & anonymous_namespace{WaveTrack.cpp}::GainAndPan::Get ( WaveTrack track)
static

Definition at line 102 of file WaveTrack.cpp.

102 {
103 return track.GetGroupData().Track::ChannelGroupAttachments
105}
ChannelGroupData & GetGroupData()
Definition: Track.cpp:171
static const Track::ChannelGroupAttachments::RegisteredFactory gainAndPanFactory
Definition: WaveTrack.cpp:88

References anonymous_namespace{WaveTrack.cpp}::gainAndPanFactory, and Track::GetGroupData().

Here is the call graph for this function:

◆ GetGain()

float anonymous_namespace{WaveTrack.cpp}::GainAndPan::GetGain ( ) const

Definition at line 112 of file WaveTrack.cpp.

113{
114 return mGain.load(std::memory_order_relaxed);
115}
std::atomic< float > mGain
Atomic because it may be read by worker threads in playback.
Definition: WaveTrack.cpp:82

◆ GetPan()

float anonymous_namespace{WaveTrack.cpp}::GainAndPan::GetPan ( ) const

Definition at line 122 of file WaveTrack.cpp.

123{
124 return mPan.load(std::memory_order_relaxed);
125}
std::atomic< float > mPan
Atomic because it may be read by worker threads in playback.
Definition: WaveTrack.cpp:84

◆ operator=()

GainAndPan & anonymous_namespace{WaveTrack.cpp}::GainAndPan::operator= ( const GainAndPan )
delete

◆ SetGain()

void anonymous_namespace{WaveTrack.cpp}::GainAndPan::SetGain ( float  value)

Definition at line 117 of file WaveTrack.cpp.

118{
119 mGain.store(value, std::memory_order_relaxed);
120}

◆ SetPan()

void anonymous_namespace{WaveTrack.cpp}::GainAndPan::SetPan ( float  value)

Definition at line 127 of file WaveTrack.cpp.

128{
129 mPan.store(value, std::memory_order_relaxed);
130}

Member Data Documentation

◆ mGain

std::atomic<float> anonymous_namespace{WaveTrack.cpp}::GainAndPan::mGain { 1.0f }
private

Atomic because it may be read by worker threads in playback.

Definition at line 82 of file WaveTrack.cpp.

◆ mPan

std::atomic<float> anonymous_namespace{WaveTrack.cpp}::GainAndPan::mPan { 0.0f }
private

Atomic because it may be read by worker threads in playback.

Definition at line 84 of file WaveTrack.cpp.


The documentation for this struct was generated from the following file: