pub type AudioConverterInputDataProc = Option<unsafe extern "C-unwind" fn(AudioConverterRef, NonNull<u32>, NonNull<NonNull<c_void>>, *mut c_void) -> i32>;AudioConverter only.Expand description
Callback function for supplying input data to AudioConverterFillBuffer.
Parameter inAudioConverter: The AudioConverter requesting input.
Parameter ioDataSize: On entry, the minimum number of bytes of audio data the converter
would like in order to fulfill its current FillBuffer request.
On exit, the number of bytes of audio data actually being provided
for input, or 0 if there is no more input.
Parameter outData: On exit, *outData should point to the audio data being provided
for input.
Parameter inUserData: The inInputDataProcUserData parameter passed to AudioConverterFillBuffer().
Returns: An OSStatus result code.
This callback function supplies input to AudioConverterFillBuffer.
The AudioConverter requests a minimum amount of data (*ioDataSize). The callback may return any amount of data. If it is less than than the minimum, the callback will simply be called again in the near future.
The callback supplies a pointer to a buffer of audio data. The callback is responsible for not freeing or altering this buffer until it is called again.
If the callback returns an error, it must return zero bytes of data. AudioConverterFillBuffer will stop producing output and return whatever output has already been produced to its caller, along with the error code. This mechanism can be used when an input proc has temporarily run out of data, but has not yet reached end of stream.
See also Apple’s documentation
Aliased Type§
pub enum AudioConverterInputDataProc {
None,
Some(unsafe extern "C-unwind" fn(*mut OpaqueAudioConverter, NonNull<u32>, NonNull<NonNull<c_void>>, *mut c_void) -> i32),
}