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

Helper class for the host side implementation of the ARA AudioModification model object. More...

Inheritance diagram for juce::ARAHostModel::AudioModification:
Collaboration diagram for juce::ARAHostModel::AudioModification:

Public Types

using Ptr = ARA::ARAAudioModificationRef
 

Public Member Functions

 AudioModification (ARA::ARAAudioModificationHostRef hostRef, ARA::Host::DocumentController &dc, AudioSource &s, const ARA::ARAAudioModificationProperties &props)
 Creates an AudioModification object.
 
auto & getAudioSource () const
 Returns the AudioSource containing this AudioModification.
 
auto & getDocumentController () const
 Returns the host side DocumentController reference.
 
Ptr getPluginRef () const
 Returns the plugin side reference to the model object.
 
void update (const ARA::ARAAudioModificationProperties &props)
 Updates the state of the corresponding ARA model object.
 

Static Public Member Functions

static void destroy (ARA::Host::DocumentController &, Ptr)
 Called by ManagedARAHandle to deregister the model object during the destruction of AudioModification.
 
static constexpr auto getEmptyProperties ()
 Returns an ARA versioned struct with the structSize correctly set for the currently used SDK version.
 

Private Attributes

std::unique_ptr< std::remove_pointer_t< Ptr >, Deleter > handle
 
AudioSourcesource
 

Detailed Description

Helper class for the host side implementation of the ARA AudioModification model object.

Its intended use is to add a member variable of this type to your host side AudioModification implementation. Then it provides a RAII approach to managing the lifetime of the corresponding objects created inside the DocumentController. When the host side object is instantiated an ARA model object is also created in the DocumentController. When the host side object is deleted it will be removed from the DocumentController as well.

The class will automatically put the DocumentController into editable state for operations that mandate this e.g. creation, deletion or updating.

You can encapsulate multiple such operations into a scope with an ARAEditGuard in order to invoke the editable state of the DocumentController only once.

@tags{ARA}

Member Typedef Documentation

◆ Ptr

using juce::ARAHostModel::ManagedARAHandle< AudioModification , ARA::ARAAudioModificationRef >::Ptr = ARA::ARAAudioModificationRef
inherited

Constructor & Destructor Documentation

◆ AudioModification()

juce::ARAHostModel::AudioModification::AudioModification ( ARA::ARAAudioModificationHostRef  hostRef,
ARA::Host::DocumentController &  dc,
AudioSource s,
const ARA::ARAAudioModificationProperties &  props 
)

Creates an AudioModification object.

During construction it registers an ARA AudioModification model object with the DocumentController that refers to the provided hostRef. When this object is deleted the corresponding DocumentController model object will also be deregistered.

You can acquire a correctly versioned ARA::ARAAudioModificationProperties struct by calling getEmptyProperties().

Places the DocumentController in editable state.

See also
ARAEditGuard

Member Function Documentation

◆ destroy()

static void juce::ARAHostModel::AudioModification::destroy ( ARA::Host::DocumentController &  ,
Ptr   
)
static

Called by ManagedARAHandle to deregister the model object during the destruction of AudioModification.

You shouldn't call this function manually.

◆ getAudioSource()

auto & juce::ARAHostModel::AudioModification::getAudioSource ( ) const
inline

Returns the AudioSource containing this AudioModification.

◆ getDocumentController()

auto & juce::ARAHostModel::ManagedARAHandle< AudioModification , ARA::ARAAudioModificationRef >::getDocumentController ( ) const
inlineinherited

Returns the host side DocumentController reference.

◆ getEmptyProperties()

static constexpr auto juce::ARAHostModel::AudioModification::getEmptyProperties ( )
inlinestaticconstexpr

Returns an ARA versioned struct with the structSize correctly set for the currently used SDK version.

You should leave structSize unchanged, and fill out the rest of the fields appropriately for the host implementation of the ARA model object.

References juce::makeARASizedStruct().

◆ getPluginRef()

Ptr juce::ARAHostModel::ManagedARAHandle< AudioModification , ARA::ARAAudioModificationRef >::getPluginRef ( ) const
inlineinherited

Returns the plugin side reference to the model object.

◆ update()

void juce::ARAHostModel::AudioModification::update ( const ARA::ARAAudioModificationProperties &  props)

Updates the state of the corresponding ARA model object.

Places the DocumentController in editable state.

You can use getEmptyProperties() to acquire a properties struct where the structSize field has already been correctly set.

Member Data Documentation

◆ handle

std::unique_ptr<std::remove_pointer_t<Ptr>, Deleter> juce::ARAHostModel::ManagedARAHandle< AudioModification , ARA::ARAAudioModificationRef >::handle
privateinherited

◆ source

AudioSource& juce::ARAHostModel::AudioModification::source
private

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