pub unsafe extern "C-unwind" fn AudioConverterFillComplexBuffer(
in_audio_converter: AudioConverterRef,
in_input_data_proc: AudioConverterComplexInputDataProc,
in_input_data_proc_user_data: *mut c_void,
io_output_data_packet_size: NonNull<u32>,
out_output_data: NonNull<AudioBufferList>,
out_packet_description: *mut AudioStreamPacketDescription,
) -> i32AudioConverter and objc2-core-audio-types only.Expand description
Converts data supplied by an input callback function, supporting non-interleaved and packetized formats.
Parameter inAudioConverter: The AudioConverter to use.
Parameter inInputDataProc: A callback function which supplies the input data.
Parameter inInputDataProcUserData: A value for the use of the callback function.
Parameter ioOutputDataPacketSize: On entry, the capacity of outOutputData expressed in packets in the
converter’s output format. On exit, the number of packets of converted
data that were written to outOutputData.
Parameter outOutputData: The converted output data is written to this buffer. On entry, the buffers’
mDataByteSize fields (which must all be the same) reflect buffer capacity.
On exit, mDataByteSize is set to the number of bytes written.
Parameter outPacketDescription: If non-null, and the converter’s output uses packet descriptions, then
packet descriptions are written to this array. It must point to a memory
block capable of holding *ioOutputDataPacketSize packet descriptions.
(See AudioFormat.h for ways to determine whether an audio format
uses packet descriptions).
Returns: An OSStatus result code.
Produces a buffer list of output data from an AudioConverter. The supplied input callback function is called whenever necessary.
If the output format uses packet descriptions, such as most compressed formats where packets vary in size or duration, the caller is expected to provide a buffer for holding packet descriptions, pointed to by outPacketDescription. The array must have the capacity to hold a packet description for each output packet that may be written. A packet description array is expected even if only a single output packet is to be written.
§Safety
in_audio_convertermust be a valid pointer.in_input_data_procmust be implemented correctly.in_input_data_proc_user_datamust be a valid pointer or null.io_output_data_packet_sizemust be a valid pointer.out_output_datamust be a valid pointer.out_packet_descriptionmust be a valid pointer or null.