pub type AUHostMusicalContextBlock = *mut DynBlock<dyn Fn(*mut c_double, *mut c_double, *mut NSInteger, *mut c_double, *mut NSInteger, *mut c_double) -> Bool>;AUAudioUnit and block2 only.Expand description
Block by which hosts provide musical tempo, time signature, and beat position.
Parameter currentTempo: The current tempo in beats per minute.
Parameter timeSignatureNumerator: The numerator of the current time signature.
Parameter timeSignatureDenominator: The denominator of the current time signature.
Parameter currentBeatPosition: The precise beat position of the beginning of the current buffer being rendered.
Parameter sampleOffsetToNextBeat: The number of samples between the beginning of the buffer being rendered and the next beat
(can be 0).
Parameter currentMeasureDownbeatPosition: The beat position corresponding to the beginning of the current measure.
Returns: YES for success.
If the host app provides this block to an AUAudioUnit (as its musicalContextBlock), then the block may be called at the beginning of each render cycle to obtain information about the current render cycle’s musical context.
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