AudioConverterConvertBuffer

Function AudioConverterConvertBuffer 

Source
pub unsafe extern "C-unwind" fn AudioConverterConvertBuffer(
    in_audio_converter: AudioConverterRef,
    in_input_data_size: u32,
    in_input_data: NonNull<c_void>,
    io_output_data_size: NonNull<u32>,
    out_output_data: NonNull<c_void>,
) -> i32
Available on crate feature AudioConverter only.
Expand description

Converts data from an input buffer to an output buffer.

Parameter inAudioConverter: The AudioConverter to use.

Parameter inInputDataSize: The size of the buffer inInputData.

Parameter inInputData: The input audio data buffer.

Parameter ioOutputDataSize: On entry, the size of the buffer outOutputData. On exit, the number of bytes written to outOutputData.

Parameter outOutputData: The output data buffer.

Returns: Produces a buffer of output data from an AudioConverter, using the supplied input buffer.

WARNING: this function will fail for any conversion where there is a variable relationship between the input and output data buffer sizes. This includes sample rate conversions and most compressed formats. In these cases, use AudioConverterFillComplexBuffer. Generally this function is only appropriate for PCM-to-PCM conversions where there is no sample rate conversion.

ยงSafety

  • in_audio_converter must be a valid pointer.
  • in_input_data must be a valid pointer.
  • io_output_data_size must be a valid pointer.
  • out_output_data must be a valid pointer.