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
 
double GetOrigin () const
 
void SetOrigin (double origin)
 
sampleFormat GetSampleFormat () const
 
void SetSampleFormat (sampleFormat format)
 
float GetVolume () const
 
void SetVolume (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 }
 
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 211 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 261 of file WaveTrack.cpp.

261 {
262 return std::make_unique<WaveTrackData>(*this);
263}

◆ Get() [1/2]

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

Definition at line 269 of file WaveTrack.cpp.

270{
271 return Get(const_cast<WaveTrack &>(track));
272}
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
static WaveTrackData & Get(WaveTrack &track)
Definition: WaveTrack.cpp:265

References BasicUI::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 265 of file WaveTrack.cpp.

265 {
266 return track.Attachments::Get<WaveTrackData>(waveTrackDataFactory);
267}
static const ChannelGroup::Attachments::RegisteredFactory waveTrackDataFactory
Definition: WaveTrack.cpp:247

References anonymous_namespace{WaveTrack.cpp}::waveTrackDataFactory.

◆ GetOrigin()

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

Definition at line 274 of file WaveTrack.cpp.

◆ GetPan()

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

Definition at line 303 of file WaveTrack.cpp.

304{
305 return mPan.load(std::memory_order_relaxed);
306}
std::atomic< float > mPan
Atomic because it may be read by worker threads in playback.
Definition: WaveTrack.cpp:239

◆ GetRate()

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

Definition at line 313 of file WaveTrack.cpp.

◆ GetSampleFormat()

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

Definition at line 283 of file WaveTrack.cpp.

284{
285 return mFormat;
286}

◆ GetVolume()

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

Definition at line 293 of file WaveTrack.cpp.

294{
295 return mGain.load(std::memory_order_relaxed);
296}
std::atomic< float > mGain
Atomic because it may be read by worker threads in playback.
Definition: WaveTrack.cpp:237

◆ operator=()

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

◆ SetOrigin()

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

Definition at line 278 of file WaveTrack.cpp.

279{
280 mOrigin = origin;
281}

◆ SetPan()

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

Definition at line 308 of file WaveTrack.cpp.

309{
310 mPan.store(value, std::memory_order_relaxed);
311}

◆ SetRate()

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

Definition at line 318 of file WaveTrack.cpp.

319{
320 mRate = value;
321}

◆ SetSampleFormat()

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

Definition at line 288 of file WaveTrack.cpp.

References anonymous_namespace{ExportPCM.cpp}::format.

◆ SetVolume()

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

Definition at line 298 of file WaveTrack.cpp.

299{
300 mGain.store(value, std::memory_order_relaxed);
301}

Member Data Documentation

◆ mFormat

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

Definition at line 243 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 237 of file WaveTrack.cpp.

◆ mOrigin

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

Definition at line 242 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 239 of file WaveTrack.cpp.

◆ mRate

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

Definition at line 241 of file WaveTrack.cpp.


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