Loading...
Searching...
No Matches
juce::ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface > Class Template Reference

## Detailed Description

template<typename RendererRef, typename Interface>
class juce::ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >

Base class used by the ::PlaybackRendererInterface and ::EditorRendererInterface plugin extension interfaces.

Hosts will want to create one or typically more ARA plugin extension instances per plugin for the purpose of playback and editor rendering. The PlaybackRegions created by the host then have to be assigned to these instances through the appropriate interfaces.

Whether a PlaybackRegion or an assigned RendererInterface is deleted first depends on the host implementation and exact use case.

By using these helper classes you can ensure that the ARA DocumentController remains in a valid state in both situations. In order to use them acquire an object from PlugInExtensionInstance::getPlaybackRendererInterface() or PlugInExtensionInstance::getEditorRendererInterface().

Then call add() to register a PlaybackRegion with that particular PlugInExtensionInstance's interface.

Now when you delete that PlaybackRegion it will be deregistered from that extension instance. If however you want to delete the plugin extension instance before the PlaybackRegion, you can delete the PlaybackRegionRegistry instance before deleting the plugin extension instance, which takes care of deregistering all PlaybackRegions.

When adding or removing PlaybackRegions the plugin instance must be in an unprepared state i.e. before AudioProcessor::prepareToPlay() or after AudioProcessor::releaseResources().

auto playbackRenderer = std::make_unique<PlaybackRendererInterface> (plugInExtensionInstance.getPlaybackRendererInterface());
auto playbackRegion = std::make_unique<PlaybackRegion> (documentController, regionSequence, audioModification, audioSource);
// Either of the following three code variations are valid
// (1) ===================================================
playbackRenderer.add (playbackRegion);
playbackRenderer.remove (playbackRegion);
// (2) ===================================================
playbackRenderer.add (playbackRegion);
playbackRegion.reset();
// (3) ===================================================
playbackRenderer.add (playbackRegion);
playbackRenderer.reset();

See also
  PluginExtensionInstance

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

- juce_audio_processors_headless/format_types/juce_ARAHosting.h

## Public Member Functions

| PlaybackRegionRegistry ()=default
| PlaybackRegionRegistry (RendererRef rendererRefIn, const Interface *interfaceIn)
void | add (PlaybackRegion &region)
| Adds a PlaybackRegion to the corresponding ::PlaybackRendererInterface or ::EditorRendererInterface.
void | remove (PlaybackRegion &region)
| Removes a PlaybackRegion from the corresponding ::PlaybackRendererInterface or ::EditorRendererInterface.
bool | isValid ()
| Returns true if the underlying ARA plugin extension instance fulfills the corresponding role.

## Constructors and Destructors

## PlaybackRegionRegistry() [1/2]

template<typename RendererRef, typename Interface>

juce::ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::PlaybackRegionRegistry | ( |  | ) |

default

## PlaybackRegionRegistry() [2/2]

template<typename RendererRef, typename Interface>

juce::ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::PlaybackRegionRegistry | ( | RendererRef | rendererRefIn,
|  | const Interface * | interfaceIn )

inline

## Member Functions

## add()

template<typename RendererRef, typename Interface>

void juce::ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::add | ( | PlaybackRegion & | region | ) |

inline

Adds a PlaybackRegion to the corresponding ::PlaybackRendererInterface or ::EditorRendererInterface.

The plugin instance must be in an unprepared state i.e. before AudioProcessor::prepareToPlay() or after AudioProcessor::releaseResources().

## remove()

template<typename RendererRef, typename Interface>

void juce::ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::remove | ( | PlaybackRegion & | region | ) |

inline

Removes a PlaybackRegion from the corresponding ::PlaybackRendererInterface or ::EditorRendererInterface.

The plugin instance must be in an unprepared state i.e. before AudioProcessor::prepareToPlay() or after AudioProcessor::releaseResources().

## isValid()

template<typename RendererRef, typename Interface>

bool juce::ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::isValid | ( |  | ) |

inline

Returns true if the underlying ARA plugin extension instance fulfills the corresponding role.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited