#[repr(C, packed(1))]pub struct ARAModelUpdateControllerInterface {
pub structSize: ARASize,
pub notifyAudioSourceAnalysisProgress: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, audioSourceHostRef: ARAAudioSourceHostRef, state: ARAAnalysisProgressState, value: f32)>,
pub notifyAudioSourceContentChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, audioSourceHostRef: ARAAudioSourceHostRef, range: *const ARAContentTimeRange, flags: ARAContentUpdateFlags)>,
pub notifyAudioModificationContentChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, audioModificationHostRef: ARAAudioModificationHostRef, range: *const ARAContentTimeRange, flags: ARAContentUpdateFlags)>,
pub notifyPlaybackRegionContentChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, playbackRegionHostRef: ARAPlaybackRegionHostRef, range: *const ARAContentTimeRange, flags: ARAContentUpdateFlags)>,
pub notifyDocumentDataChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef)>,
}Expand description
! Host interface: model update controller. ! As with all host interfaces, the function pointers in this struct must remain valid until ! all document controllers on the plug-in side that use it have been destroyed.
Fields§
§structSize: ARASize! @see_Versioned_Structs
notifyAudioSourceAnalysisProgress: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, audioSourceHostRef: ARAAudioSourceHostRef, state: ARAAnalysisProgressState, value: f32)>! Message to the host signaling analysis progress, value ranges from 0.0f to 1.0f. ! The first message must be marked with kARAAnalysisProgressStarted, the last ! with kARAAnalysisProgressCompleted. ! This notification is intended solely for displaying a progress indication if desired, but ! not to trigger content reading for updating content information. That is instead done when ! receiving notifyAudioSourceContentChanged(), see below. ! Note that since the updates are polled by the host, any analysis may already have progressed ! somewhat by the time the start notification is actually delivered, so it may start with a ! progress larger than 0. It is even possible that an analysis fully completes before its ! start is notified, in which case the plug-in may choose not notify it at all. ! If the plug-in internally executes multiple analysis task per audio source simultaneously ! (for example because it splits them by content type), it must merge all internal progress ! into a single outer progress.
notifyAudioSourceContentChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, audioSourceHostRef: ARAAudioSourceHostRef, range: *const ARAContentTimeRange, flags: ARAContentUpdateFlags)>! Message to the host when content of the given audio source changes. ! Not to be called if the change was explicitly triggered by the host, e.g. when restoring ! audio source state or if the host calls ARADocumentControllerInterface::updateAudioSourceContent(). ! When restoring state, plug-ins shall only make this call if the object state after loading is ! not equal to the archived state. This can happen e.g when unarchiving encounters errors, or ! when state is imported from older versions and converted to some updated model state. ! The time range may be NULL, this means that the entire audio source is affected. ! Note that this notification is what hosts will listen to when determining whether the state ! returned by isAudioSourceContentAnalysisIncomplete() has changed. In other words, the ! completion state of the analysis itself is considered to be a part of the overall content. ! Thus, if it changes, the overall content has changed, even if neither the grade nor the data ! for content readers did change (e.g. because an analysis failed to provide proper results). ! Plug-ins must send this notification reliably to avoid data loss when hosts rely on it in ! order to optimize saving ARA data only when it has actually changed.
notifyAudioModificationContentChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, audioModificationHostRef: ARAAudioModificationHostRef, range: *const ARAContentTimeRange, flags: ARAContentUpdateFlags)>! Message to the host when content of the given audio modification changes. ! Not to be called if the change was explicitly triggered by the host, e.g. when restoring ! audio modification state. ! When restoring state, plug-ins will only make this call if the object state after loading is ! not equal to the archived state. This can happen e.g when unarchiving encounters errors, or ! when state is imported from older versions and converted to some updated model state. ! The time range may be NULL, this means that the entire audio modification is affected. ! Whenever this notification is received, all playback regions for the given modification ! are affected as well if their range in modification time intersects with the given time range. ! Because of this, there was no separate change notification for playback region in ARA 1. ! This changed with the introduction of content-based fades in ARA 2.0, because playback region ! content can now change without any audio modification changes - hosts should now use playback ! region readers to visualize content in their arrangement, see below. ! Plug-ins must send this notification reliably to avoid data loss when hosts rely on it in ! order to optimize saving ARA data only when it has actually changed.
notifyPlaybackRegionContentChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef, playbackRegionHostRef: ARAPlaybackRegionHostRef, range: *const ARAContentTimeRange, flags: ARAContentUpdateFlags)>! Message to the host when content of the given playback region changes (added in ARA 2.0). ! In ARA 1, region content updates were implicitly derived from audio modification updates, ! (see notifyAudioModificationContentChanged()), based on the assumption that the content ! of a playback region did depend only on the modification content and the transformation ! described in the playback region properties. ! Since ARA 2.0 however, plug-ins use the grouping provided by the region sequences to ! derive further parameters for the transformation, which enables them to perform content ! based fades or other custom adjustments. This means the content of any given region can ! change even if its modification and region properties remain unchanged, and that the host ! can no longer calculate the content of a region based on the content of its modification. ! Note that when kARAContentUpdateSignalScopeRemainsUnchanged is not set, this message also ! indicates that the host needs to update any cached copies of the rendered signal it may hold, ! and needs to query getPlaybackRegionHeadAndTailTime() for potential updates. ! The time range is specified in playback time and potentially covers head and tail time too. ! The time range may be NULL, this means that the entire playback region (including its ! head and tail time, which may be updated at the same time) is affected.
notifyDocumentDataChanged: Option<unsafe extern "C" fn(controllerHostRef: ARAModelUpdateControllerHostRef)>! Message to the host when private, opaque document state that is not associated with any audio ! source or modification changes (added in ARA 2.3). ! Saving/restoring this data is controlled via ARAStoreObjectsFilter::documentData and ! ARARestoreObjectsFilter::documentData, see there. ! Plug-ins must send this notification reliably to avoid data loss when hosts rely on it in ! order to optimize saving ARA data only when it has actually changed.
Trait Implementations§
Source§impl Clone for ARAModelUpdateControllerInterface
impl Clone for ARAModelUpdateControllerInterface
Source§fn clone(&self) -> ARAModelUpdateControllerInterface
fn clone(&self) -> ARAModelUpdateControllerInterface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more