AudioConverterConvertBuffer(_:_:_:_:_:)
Converts audio data from one linear PCM format to another.
Declaration
func AudioConverterConvertBuffer(_ inAudioConverter: AudioConverterRef, _ inInputDataSize: UInt32, _ inInputData: UnsafeRawPointer, _ ioOutputDataSize: UnsafeMutablePointer<UInt32>, _ outOutputData: UnsafeMutableRawPointer) -> OSStatusParameters
- inAudioConverter:
The audio converter to use for format conversion.
- inInputDataSize:
The size, in bytes, of the audio data input buffer.
- inInputData:
The audio data to convert.
- ioOutputDataSize:
On input, the size, in bytes, of the buffer available for the converted data. On output, the number of bytes written to the output buffer (pointed to by the
outOutputDataparameter). - outOutputData:
On output, the converted audio data.
Return Value
A result code.
Discussion
This function is for the special case of converting from one linear PCM format to another. This function cannot perform sample rate conversions and cannot be used for conversion to or from most compressed formats. To perform these types of conversion, use AudioConverterFillComplexBuffer(_:_:_:_:_:_:) instead.