pub type AURenderBlock = *mut DynBlock<dyn Fn(NonNull<AudioUnitRenderActionFlags>, NonNull<AudioTimeStamp>, AUAudioFrameCount, NSInteger, NonNull<AudioBufferList>, AURenderPullInputBlock) -> AUAudioUnitStatus>;AUAudioUnit and AUComponent and block2 and objc2-core-audio-types only.Expand description
Block to render the audio unit.
All realtime operations are implemented using blocks to avoid ObjC method dispatching and the possibility of blocking.
Parameter actionFlags: Pointer to action flags.
Parameter timestamp: The HAL time at which the output data will be rendered. If there is a sample rate conversion
or time compression/expansion downstream, the sample time will not have a defined
correlation with the AudioDevice sample time.
Parameter frameCount: The number of sample frames to render.
Parameter outputBusNumber: The index of the output bus to render.
Parameter outputData: The output bus’s render buffers and flags.
The buffer pointers (outputData->mBuffers[x].mData) may be null on entry, in which case the block will render into memory it owns and modify the mData pointers to point to that memory. The block is responsible for preserving the validity of that memory until it is next called to render, or deallocateRenderResources is called.
If, on entry, the mData pointers are non-null, the block will render into those buffers.
Parameter pullInputBlock: A block which the AU will call in order to pull for input data. May be nil for instrument
and generator audio units (which do not have input busses).
Returns: An AUAudioUnitStatus result code. If an error is returned, the output data should be assumed
to be invalid.
See also Apple’s documentation