pub unsafe extern "C-unwind" fn AudioUnitRender(
in_unit: AudioUnit,
io_action_flags: *mut AudioUnitRenderActionFlags,
in_time_stamp: NonNull<AudioTimeStamp>,
in_output_bus_number: u32,
in_number_frames: u32,
io_data: NonNull<AudioBufferList>,
) -> i32AUComponent and AudioComponent and objc2-core-audio-types only.Expand description
the render operation where ioData will contain the results of the audio unit’s render operations
an audio unit will render the amount of audio data described by inNumberOfFrames and the results of that render will be contained within ioData. The caller should provide audio time stamps where at least the sample time is valid and it is incrementing sequentially from its previous call (so, the next time stamp will be the current time stamp + inNumberFrames) If the sample time is not incrementing sequentially, the audio unit will infer that there is some discontinuity with the timeline it is rendering for
The caller must provide a valid ioData AudioBufferList that matches the expected topology for the current audio format for the given bus. The buffer list can be of two variants: (1) If the mData pointers are non-null then the audio unit will render its output into those buffers. These buffers should be aligned to 16 byte boundaries (which is normally what malloc will return). (2) If the mData pointers are null, then the audio unit can provide pointers to its own buffers. In this case the audio unit is required to keep those buffers valid for the duration of the calling thread’s I/O cycle
Parameter inUnit: the audio unit
Parameter ioActionFlags: any appropriate action flags for the render operation
Parameter inTimeStamp: the time stamp that applies to this particular render operation. when
rendering for multiple output buses the time stamp will generally be the same
for each output bus, so the audio unit is able to determine without doubt that
this the same render operation
Parameter inOutputBusNumber: the output bus to render for
Parameter inNumberFrames: the number of sample frames to render
Parameter ioData: the audio buffer list that the audio unit is to render into.
Returns: noErr, or an audio unit render error
§Safety
in_unitmust be a valid pointer.io_action_flagsmust be a valid pointer or null.in_time_stampmust be a valid pointer.io_datamust be a valid pointer.