pub type AVAudioConverterInputBlock = *mut DynBlock<dyn Fn(AVAudioPacketCount, NonNull<AVAudioConverterInputStatus>) -> *mut AVAudioBuffer>;AVAudioBuffer and AVAudioConverter and AVAudioTypes and block2 only.Expand description
A block which will be called by convertToBuffer:error:withInputFromBlock: to get input data as needed.
Parameter inNumberOfPackets: This will be the number of packets required to complete the request. You may supply more or
less that this amount. If less, then the input block will get called again.
Parameter outStatus: The block must set the appropriate AVAudioConverterInputStatus enum value.
If you have supplied data, set outStatus to AVAudioConverterInputStatus_HaveData and return an AVAudioBuffer.
If you are out of data for now, set outStatus to AVAudioConverterInputStatus_NoDataNow and return nil, and the conversion routine will return as much output as could be converted with the input already supplied.
If you are at the end of stream, set outStatus to AVAudioConverterInputStatus_EndOfStream, and return nil.
Returns: An AVAudioBuffer containing data to be converted, or nil if at end of stream or no data is available. The data in the returned buffer must not be cleared or re-filled until the input block is called again or the conversion has finished.
convertToBuffer:error:withInputFromBlock: will return as much output as could be converted with the input already supplied.
See also Appleās documentation