pub type HostCallback_GetMusicalTimeLocation = Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32, *mut f32, *mut u32, *mut f64) -> i32>;AudioUnitProperties only.Expand description
Retrieve information about the musical time state of the host
If the host app has set this callback, then the audio unit can use this to obtain information about the state of musical time in the host. The audio unit can call this callback only from within the audio unit render call (otherwise the host is unable to provide information accurately to the audio unit as the information obtained is relate to the current AudioUnitRender call). If the host cannot provide the requested information, it will return kAudioUnitErr_CannotDoInCurrentContext.
The AudioUnit can provide NULL for any of the requested parameters (except for inHostUserData) if it is not interested in that particular piece of information
Parameter inHostUserData: Must be provided by the audio unit when it makes this call. It is the client data provided by the host when it set the HostCallbacks property
Parameter outDeltaSampleOffsetToNextBeat: The number of samples until the next whole beat from the start sample of the current rendering buffer
Parameter outTimeSig_Numerator: The Numerator of the current time signature
Parameter outTimeSig_Denominator: The Denominator of the current time signature (4 is a quarter note, etc)
Parameter outCurrentMeasureDownBeat: The beat that corresponds to the downbeat (first beat) of the current measure that is being rendered
See also Apple’s documentation
Aliased Type§
pub enum HostCallback_GetMusicalTimeLocation {
None,
Some(unsafe extern "C-unwind" fn(*mut c_void, *mut u32, *mut f32, *mut u32, *mut f64) -> i32),
}