- iOS 2.1+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
The audio converter object that invoked this callback to obtain new data to convert.
On input, the minimum number of packets of input audio data the converter needs for its current conversion cycle. On output, the number of packets of audio data provided for conversion, or
0if there is no more data to convert.
On output, point the fields of the
Audiostructure, passed by this parameter, to the audio data you are providing to be converted.
NULLon input, the audio converter expects this callback to provide an array of
Audiostructures on output, one for each packet of audio data you are providing in the
Stream Packet Description
On input, the custom application data you provided to the
Converter Fill Complex Buffer(_: _: _: _: _: _:)
If you named your callback function
My, you would declare it like this:
This callback supplies input audio data to the
The audio converter object requests a minimum number of packets in the
io parameter. Your callback may provide one or more packets. If the number you provide is less than the minimum requested, the converter will invoke your callback again in the near future.
You write your callback to manipulate the fields of the
Audio structure, in the
io parameter, to point to one or more buffers of audio data. You use a single buffer for interleaved PCM data, or multiple buffers for non-interleaved PCM data. Your callback is responsible for not freeing or altering the buffer(s) until invoked again.
If your callback returns an error, it must return zero packets of data. Upon receiving zero packets, the
Audio function delivers any pending output, stops producing further output, and returns the error code. You can use this mechanism when an input callback has temporarily run out of data but has not yet reached the end of the input audio stream.