AUHostTransportStateBlock

Type Alias AUHostTransportStateBlock 

Source
pub type AUHostTransportStateBlock = *mut DynBlock<dyn Fn(*mut AUHostTransportStateFlags, *mut c_double, *mut c_double, *mut c_double) -> Bool>;
Available on crate features AUAudioUnit and block2 only.
Expand description

Block by which hosts provide information about their transport state.

Parameter transportStateFlags: The current state of the transport.

Parameter currentSamplePosition: The current position in the host’s timeline, in samples at the audio unit’s output sample rate.

Parameter cycleStartBeatPosition: If cycling, the starting beat position of the cycle.

Parameter cycleEndBeatPosition: If cycling, the ending beat position of the cycle.

If the host app provides this block to an AUAudioUnit (as its transportStateBlock), then the block may be called at the beginning of each render cycle to obtain information about the current transport state.

Any of the provided parameters may be null to indicate that the audio unit is not interested in that particular piece of information.

See also Apple’s documentation