Host Dispatch

Detailed Description

Classes and interfaces designed to ease ARA hosting implementations.
Requires linking ARAHostDispatch.cpp with your binary.

Subpages

 Host Interfaces
 Interfaces to be implemented by ARA hosts.
 
 Plug-In Interface Wrappers
 Wrappers for the interfaces used to communicate with and control ARA plug-ins.
 

Classes

class  ARA::Host::PlugInExtensionInstance
 Optional wrapper class for the ARAPlugInExtensionInstance provided by the plug-in. More...
 

Macros

#define ARA_MAP_HOST_REF(HostClassType, FirstHostRefType, ...)
 Type safe conversions to/from host ref: toHostRef () and fromHostRef<> (). More...
 
#define ARA_PLUGIN_MANAGED_OBJECT   ARA_DISABLE_COPY_AND_MOVE
 Tag objects maintained by the plug-in to prevent accidentally copying/moving them.
 

Typedefs

template<auto member>
using ARA::Host::Properties = SizedStruct< member >
 C++ wrapper for ARA variable-sized properties structs, ensures their proper initialization.
 

Class Documentation

◆ ARA::Host::PlugInExtensionInstance

class ARA::Host::PlugInExtensionInstance

Optional wrapper class for the ARAPlugInExtensionInstance provided by the plug-in.


Deprecated
Hosts should to instead use PlaybackRenderer, EditorRenderer and EditorView directly.

Macro Definition Documentation

◆ ARA_MAP_HOST_REF

#define ARA_MAP_HOST_REF (   HostClassType,
  FirstHostRefType,
  ... 
)
Value:
static inline ARA::ToRefConversionHelper<HostClassType, FirstHostRefType, ##__VA_ARGS__> toHostRef (const HostClassType* ptr) noexcept { return ARA::ToRefConversionHelper<HostClassType, FirstHostRefType, ##__VA_ARGS__> { ptr }; } \
template <typename DesiredHostClassType = HostClassType, typename HostRefType, typename std::enable_if<std::is_constructible<ARA::FromRefConversionHelper<HostClassType, FirstHostRefType, ##__VA_ARGS__>, HostRefType>::value, bool>::type = true> \
static inline DesiredHostClassType* fromHostRef (HostRefType ref) noexcept { HostClassType* object { ARA::FromRefConversionHelper<HostClassType, FirstHostRefType, ##__VA_ARGS__> (ref) }; return static_cast<DesiredHostClassType*> (object); }

Type safe conversions to/from host ref: toHostRef () and fromHostRef<> ().

This macro defines custom overloads of the toHostRef () and fromHostRef<> () conversion functions which act as type safe casts between your implementation class pointers and the opaque host refs that the ARA API uses. fromHostRef<>() additionally allows for optional up-casting from base to derived classes if needed. The first macro argument is your implementation class, followed by all host ref types that you want this class to comply with.
Whenever using your C++ object pointers as host refs, you should apply the conversion macros like so:

// declare the conversion in the appropriate header
class MyHostAudioSource;
// whenever exporting host refs to the plug-in, use toHostRef ()
MyHostAudioSource* audioSource = ...;
ARAAudioSourceHostRef audioSourceHostRef = toHostRef (audioSource);
// whenever the plug-in passes a host ref back to you, use fromHostRef<> ()
ARAAudioSourceHostRef audioSourceHostRef; // usually provided as argument to a function call
MyHostAudioSource* audioSource = fromHostRef (audioSourceHostRef);
#define ARA_MAP_HOST_REF(HostClassType, FirstHostRefType,...)
Type safe conversions to/from host ref: toHostRef () and fromHostRef<> ().
Definition: ARAHostDispatch.h:61
struct ARAAudioSourceHostRefMarkupType * ARAAudioSourceHostRef
Reference to the host side representation of an audio source (opaque to the plug-in).
Definition: ARAInterface.h:792