JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::ARAAudioSource Class Reference

Base class representing an ARA audio source. More...

#include <juce_ARAModelObjects.h>

Inheritance diagram for juce::ARAAudioSource:
Collaboration diagram for juce::ARAAudioSource:

Public Types

using ARAAnalysisProgressState = ARA::ARAAnalysisProgressState
 
using Listener = ARAAudioSourceListener
 
using PropertiesPtr = ARA::PlugIn::PropertiesPtr< ARA::ARAAudioSourceProperties >
 

Public Member Functions

void addListener (ARAAudioSourceListener *l)
 Subscribe l to notified by changes to the object.
 
template<typename AudioModification_t = ARAAudioModification>
const std::vector< AudioModification_t * > & getAudioModifications () const noexcept
 Returns the result of ARA::PlugIn::AudioSource::getAudioModifications() with the pointers within cast to ARAAudioModification*.
 
ARAObjectgetChild (size_t index) override
 Returns the child object associated with the given index.
 
template<typename Document_t = ARADocument>
Document_t * getDocument () const noexcept
 Returns the result of ARA::PlugIn::AudioSource::getDocument() with the pointer cast to ARADocument*.
 
size_t getNumChildren () const noexcept override
 Returns the number of ARA model objects aggregated by this object.
 
ARAObjectgetParent () override
 Returns the ARA model object that aggregates this object.
 
void notifyAnalysisProgressCompleted ()
 Notify the ARA host and any listeners of analysis progress.
 
void notifyAnalysisProgressStarted ()
 Notify the ARA host and any listeners of analysis progress.
 
void notifyAnalysisProgressUpdated (float progress)
 Notify the ARA host and any listeners of analysis progress.
 
void notifyContentChanged (ARAContentUpdateScopes scopeFlags, bool notifyARAHost)
 Notify the ARA host and any listeners of a content update initiated by the plug-in.
 
void notifyListeners (Callback &&callback)
 Call the provided callback for each of the added listeners.
 
void removeListener (ARAAudioSourceListener *l)
 Unsubscribe l from object notifications.
 
template<typename Fn >
void traverse (Fn &&fn)
 Implements a depth first traversal of the ARA model graph starting from the current object, and visiting its children recursively.
 
void visit (ARAObjectVisitor &visitor) override
 Allows the retrieval of the concrete type of a model object.
 

Public Attributes

friend ARADocumentController
 
ARA::PlugIn::AnalysisProgressTracker internalAnalysisProgressTracker
 

Private Attributes

ListenerList< ARAAudioSourceListenerlisteners
 

Detailed Description

Base class representing an ARA audio source.

@tags{ARA}

Member Typedef Documentation

◆ ARAAnalysisProgressState

using juce::ARAAudioSource::ARAAnalysisProgressState = ARA::ARAAnalysisProgressState

◆ Listener

◆ PropertiesPtr

using juce::ARAAudioSource::PropertiesPtr = ARA::PlugIn::PropertiesPtr<ARA::ARAAudioSourceProperties>

Member Function Documentation

◆ addListener()

void juce::ARAListenableModelClass< ARAAudioSourceListener >::addListener ( ARAAudioSourceListener l)
inlineinherited

Subscribe l to notified by changes to the object.

Parameters
lThe listener instance.

◆ getAudioModifications()

template<typename AudioModification_t = ARAAudioModification>
const std::vector< AudioModification_t * > & juce::ARAAudioSource::getAudioModifications ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::AudioSource::getAudioModifications() with the pointers within cast to ARAAudioModification*.

If you have overridden ARADocumentControllerSpecialisation::doCreateAudioModification(), then you can use the template parameter to cast the pointers to your subclass of ARAAudioModification.

◆ getChild()

ARAObject * juce::ARAAudioSource::getChild ( size_t  index)
overridevirtual

Returns the child object associated with the given index.

The index should be smaller than the value returned by getNumChildren().

Note that the index of a particular object may change when the ARA model graph is edited.

Implements juce::ARAObject.

◆ getDocument()

template<typename Document_t = ARADocument>
Document_t * juce::ARAAudioSource::getDocument ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::AudioSource::getDocument() with the pointer cast to ARADocument*.

If you have overridden ARADocumentControllerSpecialisation::doCreateDocument(), then you can use the template parameter to cast the pointers to your subclass of ARADocument.

◆ getNumChildren()

size_t juce::ARAAudioSource::getNumChildren ( ) const
overridevirtualnoexcept

Returns the number of ARA model objects aggregated by this object.

Objects that are merely referred to, but not aggregated by the current object are not included in this count, e.g. a referenced RegionSequence does not count as a child of the referring PlaybackRegion.

See the ARA documentation's ARA Model Graph Overview for more details.

Implements juce::ARAObject.

◆ getParent()

ARAObject * juce::ARAAudioSource::getParent ( )
inlineoverridevirtual

Returns the ARA model object that aggregates this object.

Returns nullptr for the ARADocument root object.

Implements juce::ARAObject.

◆ notifyAnalysisProgressCompleted()

void juce::ARAAudioSource::notifyAnalysisProgressCompleted ( )

Notify the ARA host and any listeners of analysis progress.

Contrary to most ARA functions, this call can be made from any thread. The implementation will enqueue these notifications and later post them from the message thread. Calling code must ensure start and completion state are always balanced, and must send updates in ascending order.

◆ notifyAnalysisProgressStarted()

void juce::ARAAudioSource::notifyAnalysisProgressStarted ( )

Notify the ARA host and any listeners of analysis progress.

Contrary to most ARA functions, this call can be made from any thread. The implementation will enqueue these notifications and later post them from the message thread. Calling code must ensure start and completion state are always balanced, and must send updates in ascending order.

◆ notifyAnalysisProgressUpdated()

void juce::ARAAudioSource::notifyAnalysisProgressUpdated ( float  progress)

Notify the ARA host and any listeners of analysis progress.

Contrary to most ARA functions, this call can be made from any thread. The implementation will enqueue these notifications and later post them from the message thread. Calling code must ensure start and completion state are always balanced, and must send updates in ascending order.

Parameters
progressProgress normalized to the 0..1 range.

◆ notifyContentChanged()

void juce::ARAAudioSource::notifyContentChanged ( ARAContentUpdateScopes  scopeFlags,
bool  notifyARAHost 
)

Notify the ARA host and any listeners of a content update initiated by the plug-in.

This must be called by the plug-in model management code on the message thread whenever updating the internal content representation, such as after successfully analyzing a new tempo map. Listeners will be notified immediately. If notifyARAHost is true, a notification to the host will be enqueued and sent out the next time it polls for updates. notifyARAHost must be false if the update was triggered by the host via doUpdateAudioSourceContent(). Furthermore, notifyARAHost must be false if the updated content is being restored from an archive.

Parameters
scopeFlagsThe scope of the content update.
notifyARAHostIf true, the ARA host will be notified of the content change.

◆ notifyListeners()

void juce::ARAListenableModelClass< ARAAudioSourceListener >::notifyListeners ( Callback &&  callback)
inlineinherited

Call the provided callback for each of the added listeners.

◆ removeListener()

void juce::ARAListenableModelClass< ARAAudioSourceListener >::removeListener ( ARAAudioSourceListener l)
inlineinherited

Unsubscribe l from object notifications.

Parameters
lThe listener instance.

◆ traverse()

template<typename Fn >
void juce::ARAObject::traverse ( Fn &&  fn)
inlineinherited

Implements a depth first traversal of the ARA model graph starting from the current object, and visiting its children recursively.

The provided function should accept a single ARAObject& parameter.

References juce::ARAObject::getChild(), juce::ARAObject::getNumChildren(), and juce::ARAObject::traverse().

Referenced by juce::ARAObject::traverse().

◆ visit()

void juce::ARAAudioSource::visit ( ARAObjectVisitor visitor)
inlineoverridevirtual

Allows the retrieval of the concrete type of a model object.

To use this, create a new class derived from ARAObjectVisitor and override its functions depending on which concrete types you are interested in.

Calling this function inside the function passed to ARAObject::traverse() allows you to map the entire ARA model graph.

Implements juce::ARAObject.

References juce::ARAObjectVisitor::visitAudioSource().

Member Data Documentation

◆ ARADocumentController

friend juce::ARAAudioSource::ARADocumentController

◆ internalAnalysisProgressTracker

ARA::PlugIn::AnalysisProgressTracker juce::ARAAudioSource::internalAnalysisProgressTracker

◆ listeners


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