Skip to main content

ARAModelUpdateControllerInterface

Struct ARAModelUpdateControllerInterface 

Source
#[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

Source§

fn clone(&self) -> ARAModelUpdateControllerInterface

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ARAModelUpdateControllerInterface

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ARAModelUpdateControllerInterface

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.