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

Public Member Functions

 WaveTrackData ()=default
 
 WaveTrackData (const WaveTrackData &)
 
WaveTrackDataoperator= (const WaveTrackData &)=delete
 
 ~WaveTrackData () override
 
std::unique_ptr< ClientData::Cloneable<> > Clone () const override
 
int GetWaveColorIndex () const
 
void SetWaveColorIndex (int index)
 
double GetOrigin () const
 
void SetOrigin (double origin)
 
sampleFormat GetSampleFormat () const
 
void SetSampleFormat (sampleFormat format)
 
float GetGain () const
 
void SetGain (float value)
 
float GetPan () const
 
void SetPan (float value)
 
int GetRate () const
 
void SetRate (int value)
 
- Public Member Functions inherited from ClientData::Cloneable< Covariant, Owner >
 Cloneable ()=default
 
 Cloneable (const Cloneable &)=default
 
Cloneableoperator= (const Cloneable &)=default
 
virtual ~Cloneable ()=default
 
virtual PointerType Clone () const =0
 

Static Public Member Functions

static WaveTrackDataGet (WaveTrack &track)
 
static const WaveTrackDataGet (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...
 
int mRate { 44100 }
 
double mOrigin { 0.0 }
 
int mWaveColorIndex { 0 }
 
sampleFormat mFormat { floatSample }
 

Additional Inherited Members

- Public Types inherited from ClientData::Cloneable< Covariant, Owner >
using Base = std::conditional_t< std::is_void_v< Covariant >, Cloneable, Covariant >
 
using PointerType = Owner< Base >
 

Detailed Description

Definition at line 573 of file WaveTrack.cpp.

Constructor & Destructor Documentation

◆ WaveTrackData() [1/2]

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

◆ WaveTrackData() [2/2]

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

◆ ~WaveTrackData()

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

Member Function Documentation

◆ Clone()

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

Implements ClientData::Cloneable< Covariant, Owner >.

Definition at line 628 of file WaveTrack.cpp.

628 {
629 return std::make_unique<WaveTrackData>(*this);
630}

◆ Get() [1/2]

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

Definition at line 637 of file WaveTrack.cpp.

638{
639 return Get(const_cast<WaveTrack &>(track));
640}
A Track that contains audio waveform data.
Definition: WaveTrack.h:227
static WaveTrackData & Get(WaveTrack &track)
Definition: WaveTrack.cpp:632

References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get().

Here is the call graph for this function:

◆ Get() [2/2]

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

Definition at line 632 of file WaveTrack.cpp.

632 {
633 return track.GetGroupData().Attachments
635}
ChannelGroupData & GetGroupData()
Definition: Track.cpp:159
static const ChannelGroup::Attachments::RegisteredFactory waveTrackDataFactory
Definition: WaveTrack.cpp:613

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

Here is the call graph for this function:

◆ GetGain()

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

Definition at line 671 of file WaveTrack.cpp.

672{
673 return mGain.load(std::memory_order_relaxed);
674}
std::atomic< float > mGain
Atomic because it may be read by worker threads in playback.
Definition: WaveTrack.cpp:602

◆ GetOrigin()

double anonymous_namespace{WaveTrack.cpp}::WaveTrackData::GetOrigin ( ) const

Definition at line 652 of file WaveTrack.cpp.

◆ GetPan()

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

Definition at line 681 of file WaveTrack.cpp.

682{
683 return mPan.load(std::memory_order_relaxed);
684}
std::atomic< float > mPan
Atomic because it may be read by worker threads in playback.
Definition: WaveTrack.cpp:604

◆ GetRate()

int anonymous_namespace{WaveTrack.cpp}::WaveTrackData::GetRate ( ) const

Definition at line 691 of file WaveTrack.cpp.

◆ GetSampleFormat()

sampleFormat anonymous_namespace{WaveTrack.cpp}::WaveTrackData::GetSampleFormat ( ) const

Definition at line 661 of file WaveTrack.cpp.

662{
663 return mFormat;
664}

◆ GetWaveColorIndex()

int anonymous_namespace{WaveTrack.cpp}::WaveTrackData::GetWaveColorIndex ( ) const

Definition at line 642 of file WaveTrack.cpp.

◆ operator=()

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

◆ SetGain()

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

Definition at line 676 of file WaveTrack.cpp.

677{
678 mGain.store(value, std::memory_order_relaxed);
679}

◆ SetOrigin()

void anonymous_namespace{WaveTrack.cpp}::WaveTrackData::SetOrigin ( double  origin)

Definition at line 656 of file WaveTrack.cpp.

657{
658 mOrigin = origin;
659}

◆ SetPan()

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

Definition at line 686 of file WaveTrack.cpp.

687{
688 mPan.store(value, std::memory_order_relaxed);
689}

◆ SetRate()

void anonymous_namespace{WaveTrack.cpp}::WaveTrackData::SetRate ( int  value)

Definition at line 696 of file WaveTrack.cpp.

697{
698 mRate = value;
699}

◆ SetSampleFormat()

void anonymous_namespace{WaveTrack.cpp}::WaveTrackData::SetSampleFormat ( sampleFormat  format)

Definition at line 666 of file WaveTrack.cpp.

References anonymous_namespace{ExportPCM.cpp}::format.

◆ SetWaveColorIndex()

void anonymous_namespace{WaveTrack.cpp}::WaveTrackData::SetWaveColorIndex ( int  index)

Definition at line 647 of file WaveTrack.cpp.

648{
649 mWaveColorIndex = index;
650}

Member Data Documentation

◆ mFormat

sampleFormat anonymous_namespace{WaveTrack.cpp}::WaveTrackData::mFormat { floatSample }
private

Definition at line 609 of file WaveTrack.cpp.

◆ mGain

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

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

Definition at line 602 of file WaveTrack.cpp.

◆ mOrigin

double anonymous_namespace{WaveTrack.cpp}::WaveTrackData::mOrigin { 0.0 }
private

Definition at line 607 of file WaveTrack.cpp.

◆ mPan

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

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

Definition at line 604 of file WaveTrack.cpp.

◆ mRate

int anonymous_namespace{WaveTrack.cpp}::WaveTrackData::mRate { 44100 }
private

Definition at line 606 of file WaveTrack.cpp.

◆ mWaveColorIndex

int anonymous_namespace{WaveTrack.cpp}::WaveTrackData::mWaveColorIndex { 0 }
private

Definition at line 608 of file WaveTrack.cpp.


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