Skip to main content

ARAAudioAccessControllerInterface

Struct ARAAudioAccessControllerInterface 

Source
#[repr(C, packed(1))]
pub struct ARAAudioAccessControllerInterface { pub structSize: ARASize, pub createAudioReaderForSource: Option<unsafe extern "C" fn(controllerHostRef: ARAAudioAccessControllerHostRef, audioSourceHostRef: ARAAudioSourceHostRef, use64BitSamples: ARABool) -> ARAAudioReaderHostRef>, pub readAudioSamples: Option<unsafe extern "C" fn(controllerHostRef: ARAAudioAccessControllerHostRef, audioReaderHostRef: ARAAudioReaderHostRef, samplePosition: ARASamplePosition, samplesPerChannel: ARASampleCount, buffers: *const *mut c_void) -> ARABool>, pub destroyAudioReader: Option<unsafe extern "C" fn(controllerHostRef: ARAAudioAccessControllerHostRef, audioReaderHostRef: ARAAudioReaderHostRef)>, }
Expand description

! Host interface: audio access 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_

§createAudioReaderForSource: Option<unsafe extern "C" fn(controllerHostRef: ARAAudioAccessControllerHostRef, audioSourceHostRef: ARAAudioSourceHostRef, use64BitSamples: ARABool) -> ARAAudioReaderHostRef>

! Create audio reader instance to access sample data in an audio source. ! The format of the data is matching the format of the audio source, with a choice of reading ! samples as 32 bit or 64 bit (hosts must support both formats). ! Similar to the rules for creating content readers, the plug-in may call these functions only ! from calls in the “Audio Source Management” section of ARADocumentControllerInterface for ! the particular audio source the call is referring to, or from ! ARADocumentControllerInterface::endEditing() for any audio source. ! Contrary to content readers, audio readers are long-living objects that are not bound to a ! certain stack frame.

§readAudioSamples: Option<unsafe extern "C" fn(controllerHostRef: ARAAudioAccessControllerHostRef, audioReaderHostRef: ARAAudioReaderHostRef, samplePosition: ARASamplePosition, samplesPerChannel: ARASampleCount, buffers: *const *mut c_void) -> ARABool>

! Read audio samples. ! The samples are provided in non-interleaved buffers of double or float data, depending on ! whether use64BitSamples was set when creating the reader. The channel count equals the ! channel count of the audio source. The data alignment and byte order always matches the ! machine’s native layout. ! If the requested sample range extends beyond the start or end of the audio source, the ! out-of-range samples should be filled with silence. This should not be treated as an error. ! This potentially blocking function may be called from any non-realtime thread (including ! threads for offline rendering), but not from more than one thread per reader at the same time. ! The host may decide to let the thread sleep until the requested data is available, the ! plug-in must be designed to deal with this without triggering priority inversion. ! The target buffer(s) are provided by the caller. ! Result is kARATrue upon success, or kARAFalse when there is a critical, nonrecoverable ! I/O error, such as a network failure while the file is being read from a server. ! In case of failing in this call, the buffers must be filled with silence and the host must ! notify the user about the problem in an appropriate way. The plug-in must deal gracefully ! with any such I/O errors, both during analysis and rendering.

§destroyAudioReader: Option<unsafe extern "C" fn(controllerHostRef: ARAAudioAccessControllerHostRef, audioReaderHostRef: ARAAudioReaderHostRef)>

! Destroy given audio reader created by the host. ! The caller must guarantee that the reader is currently not in use in some other thread. ! See ARAAudioAccessControllerInterface::createAudioReaderForSource() about the restrictions when to call this.

Trait Implementations§

Source§

impl Clone for ARAAudioAccessControllerInterface

Source§

fn clone(&self) -> ARAAudioAccessControllerInterface

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 ARAAudioAccessControllerInterface

Source§

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

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

impl Copy for ARAAudioAccessControllerInterface

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.