AudioConverterRef |
A reference to an AudioConverter object.
typedef struct OpaqueAudioConverter * AudioConverterRef;
AudioConverterInputDataProc |
Callback function for supplying input data to AudioConverterFillBuffer.
typedef OSStatus (*AudioConverterInputDataProc)( AudioConverterRef inAudioConverter, UInt32*ioDataSize, void** outData, void*inUserData);
inAudioConverter
- The AudioConverter requesting input.
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.
outData
- On exit, *outData should point to the audio data being provided for input.
inUserData
- The inInputDataProcUserData parameter passed to AudioConverterFillBuffer().
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.
AudioConverterComplexInputDataProc |
Callback function for supplying input data to AudioConverterFillComplexBuffer.
typedef OSStatus (*AudioConverterComplexInputDataProc)( AudioConverterRef inAudioConverter, UInt32*ioNumberDataPackets, AudioBufferList*ioData, AudioStreamPacketDescription** outDataPacketDescription, void*inUserData);
inAudioConverter
- The AudioConverter requesting input.
ioNumberDataPackets
- On entry, the minimum number of packets of input audio data the converter would like in order to fulfill its current FillBuffer request. On exit, the number of packets of audio data actually being provided for input, or 0 if there is no more input.
ioData
- On exit, the members of ioData should be set to point to the audio data being provided for input.
outDataPacketDescription
- If non-null, on exit, the callback is expected to fill this in with an AudioStreamPacketDescription for each packet of input data being provided.
inUserData
- The inInputDataProcUserData parameter passed to AudioConverterFillBuffer().
This callback function supplies input to AudioConverterFillComplexBuffer.
The AudioConverter requests a minimum number of packets (*ioNumberDataPackets).
The callback may return one or more packets. If this is less than than the minimum,
the callback will simply be called again in the near future.
The callback manipulates the members of ioData to point to one or more buffers
of audio data (multiple buffers are used with non-interleaved PCM 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 packets of data.
AudioConverterFillComplexBuffer 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.
(Last Updated July 18, 2005)