TracktionEngine
Public Member Functions | List of all members
tracktion::engine::AbletonLink::Listener Struct Referenceabstract

When Link is on, you shouldn't set the tempo directly. More...

Public Member Functions

virtual ~Listener ()=default
 Destructor. More...
 
virtual void linkRequestedStartStopChange (bool isPlaying)=0
 Called by link to request that tracktion starts or stops its tempo. More...
 
virtual void linkRequestedTempoChange (double newBpm)=0
 Called by link to request that tracktion changes its tempo. More...
 
virtual void linkConnectionChanged ()=0
 Called by Link when the number of peer connections changes. More...
 
virtual void linkRequestedPositionChange (BeatDuration adjustment)=0
 Should be implemented to perform a larger beat position change. More...
 

Detailed Description

When Link is on, you shouldn't set the tempo directly.

Instead add yourself as a listener, call requestTempoChange() and wait for a linkRequestedTempoChange() callback.

If a large position change is required to get in sync with other clients, linkRequestedPositionChange is called and the listener user must perform it. Usually, however, this object can perform some nudging to keep in sync.

Constructor & Destructor Documentation

◆ ~Listener()

virtual tracktion::engine::AbletonLink::Listener::~Listener ( )
virtualdefault

Destructor.

Member Function Documentation

◆ linkRequestedStartStopChange()

virtual void tracktion::engine::AbletonLink::Listener::linkRequestedStartStopChange ( bool  isPlaying)
pure virtual

Called by link to request that tracktion starts or stops its tempo.

[[ message_thread ]]

◆ linkRequestedTempoChange()

virtual void tracktion::engine::AbletonLink::Listener::linkRequestedTempoChange ( double  newBpm)
pure virtual

Called by link to request that tracktion changes its tempo.

[[ message_thread ]]

◆ linkConnectionChanged()

virtual void tracktion::engine::AbletonLink::Listener::linkConnectionChanged ( )
pure virtual

Called by Link when the number of peer connections changes.

See also
isConnected, getNumPeers [[ message_thread ]]

◆ linkRequestedPositionChange()

virtual void tracktion::engine::AbletonLink::Listener::linkRequestedPositionChange ( BeatDuration  adjustment)
pure virtual

Should be implemented to perform a larger beat position change.

N.B. This will be called on the audio thread and the beat adjustment should take place before the next audio block. This usually means posting a position change directly in to the EditPlaybackContext. Just make sure you don't block during this callback. [[ audio_thread ]]


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