TracktionEngine
Public Member Functions | List of all members
tracktion::engine::LiveClipLevel Struct Reference

Provides a thread-safe way to share a clip's levels with an audio engine without worrying about the Clip being deleted from underneath you. More...

Public Member Functions

 LiveClipLevel () noexcept=default
 Creates an empty LiveClipLevel. More...
 
 LiveClipLevel (std::shared_ptr< ClipLevel > l) noexcept
 Creates a LiveClipLevel from a ClipLevel. More...
 
float getGain () const noexcept
 Returns the clip's absolute gain. More...
 
float getPan () const noexcept
 Returns the clip's pan from -1.0 to 1.0. More...
 
bool isMute () const noexcept
 Returns true if the clip is muted. More...
 
float getGainIncludingMute () const noexcept
 Returns the clip's gain if the clip is not muted. More...
 
void getLeftAndRightGains (float &left, float &right) const noexcept
 Reutrns the left and right gains taking in to account mute and pan values. More...
 

Detailed Description

Provides a thread-safe way to share a clip's levels with an audio engine without worrying about the Clip being deleted from underneath you.

Constructor & Destructor Documentation

◆ LiveClipLevel() [1/2]

tracktion::engine::LiveClipLevel::LiveClipLevel ( )
defaultnoexcept

Creates an empty LiveClipLevel.

◆ LiveClipLevel() [2/2]

tracktion::engine::LiveClipLevel::LiveClipLevel ( std::shared_ptr< ClipLevel l)
noexcept

Creates a LiveClipLevel from a ClipLevel.

Member Function Documentation

◆ getGain()

float tracktion::engine::LiveClipLevel::getGain ( ) const
noexcept

◆ getPan()

float tracktion::engine::LiveClipLevel::getPan ( ) const
noexcept

Returns the clip's pan from -1.0 to 1.0.

Referenced by getLeftAndRightGains().

◆ isMute()

bool tracktion::engine::LiveClipLevel::isMute ( ) const
noexcept

Returns true if the clip is muted.

Referenced by tracktion::engine::MidiNodeHelpers::createMessagesForTime(), and getGainIncludingMute().

◆ getGainIncludingMute()

float tracktion::engine::LiveClipLevel::getGainIncludingMute ( ) const
noexcept

Returns the clip's gain if the clip is not muted.

References getGain(), and isMute().

Referenced by getLeftAndRightGains(), and tracktion::engine::SubSampleWaveAudioNode::renderSection().

◆ getLeftAndRightGains()

void tracktion::engine::LiveClipLevel::getLeftAndRightGains ( float &  left,
float &  right 
) const
noexcept

Reutrns the left and right gains taking in to account mute and pan values.

References getGainIncludingMute(), and getPan().

Referenced by tracktion::engine::SubSampleWaveAudioNode::renderSection().


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