Base class used by the PlaybackRendererInterface and EditorRendererInterface plugin extension interfaces. More...
#include <juce_ARAHosting.h>
Public Member Functions | |
PlaybackRegionRegistry ()=default | |
PlaybackRegionRegistry (RendererRef rendererRefIn, const Interface *interfaceIn) | |
void | add (PlaybackRegion ®ion) |
Adds a PlaybackRegion to the corresponding PlaybackRendererInterface or EditorRendererInterface. | |
void | remove (PlaybackRegion ®ion) |
Removes a PlaybackRegion from the corresponding PlaybackRendererInterface or EditorRendererInterface. | |
bool | isValid () |
Returns true if the underlying ARA plugin extension instance fulfills the corresponding role. | |
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().
|
default |
ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::PlaybackRegionRegistry | ( | RendererRef | rendererRefIn, |
const Interface * | interfaceIn ) |
void ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::add | ( | PlaybackRegion & | region | ) |
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().
void ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::remove | ( | PlaybackRegion & | region | ) |
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().
bool ARAHostModel::PlaybackRegionRegistry< RendererRef, Interface >::isValid | ( | ) |
Returns true if the underlying ARA plugin extension instance fulfills the corresponding role.