#[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
impl Clone for ARAAudioAccessControllerInterface
Source§fn clone(&self) -> ARAAudioAccessControllerInterface
fn clone(&self) -> ARAAudioAccessControllerInterface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more