AudioConverterNew |
Create a new AudioConverter.
extern OSStatus AudioConverterNew( const AudioStreamBasicDescription*inSourceFormat, const AudioStreamBasicDescription*inDestinationFormat, AudioConverterRef*outAudioConverter);
inSourceFormat
- The format of the source audio to be converted.
inDestinationFormat
- The destination format to which the audio is to be converter.
outAudioConverter
- On successful return, points to a new AudioConverter instance.
For a pair of linear PCM formats, the following conversions
are supported:
AudioConverterNewSpecific |
Create a new AudioConverter using specific codecs.
extern OSStatus AudioConverterNewSpecific( const AudioStreamBasicDescription*inSourceFormat, const AudioStreamBasicDescription*inDestinationFormat, UInt32 inNumberClassDescriptions, AudioClassDescription*inClassDescriptions, AudioConverterRef*outAudioConverter) ;
inSourceFormat
- The format of the source audio to be converted.
inDestinationFormat
- The destination format to which the audio is to be converter.
inNumberClassDescriptions
- The number of class descriptions.
inClassDescriptions
- AudioClassDescriptions specifiying the codec to instantiate.
outAudioConverter
- On successful return, points to a new AudioConverter instance.
This function is identical to AudioConverterNew(), except that the client may explicitly choose which codec to instantiate if there is more than one choice.
AudioConverterDispose |
Destroy an AudioConverter.
extern OSStatus AudioConverterDispose( AudioConverterRef inAudioConverter);
inAudioConverter
- The AudioConverter to dispose.
AudioConverterReset |
Reset an AudioConverter
extern OSStatus AudioConverterReset( AudioConverterRef inAudioConverter);
inAudioConverter
- The AudioConverter to reset.
Should be called whenever there is a discontinuity in the source audio stream being provided to the converter. This will flush any internal buffers in the converter.
AudioConverterGetPropertyInfo |
Returns information about an AudioConverter property.
extern OSStatus AudioConverterGetPropertyInfo( AudioConverterRef inAudioConverter, AudioConverterPropertyID inPropertyID, UInt32*outSize, Boolean*outWritable);
inAudioConverter
- The AudioConverter to query.
inPropertyID
- The property to query.
outSize
- If non-null, on exit, the size of the property value in bytes.
outWritable
- If non-null, on exit, indicates whether the property value is writable.
AudioConverterGetProperty |
Returns an AudioConverter property value.
extern OSStatus AudioConverterGetProperty( AudioConverterRef inAudioConverter, AudioConverterPropertyID inPropertyID, UInt32*ioPropertyDataSize, void*outPropertyData);
inAudioConverter
- The AudioConverter to query.
inPropertyID
- The property to fetch.
ioPropertyDataSize
- On entry, the size of the memory pointed to by outPropertyData. On successful exit, the size of the property value.
outPropertyData
- On exit, the property value.
AudioConverterSetProperty |
Sets an AudioConverter property value.
extern OSStatus AudioConverterSetProperty( AudioConverterRef inAudioConverter, AudioConverterPropertyID inPropertyID, UInt32 inPropertyDataSize, const void*inPropertyData);
inAudioConverter
- The AudioConverter to modify.
inPropertyID
- The property to set.
inPropertyDataSize
- The size in bytes of the property value.
inPropertyData
- Points to the new property value.
AudioConverterFillBuffer |
Converts data supplied by an input callback function.
extern OSStatus AudioConverterFillBuffer( AudioConverterRef inAudioConverter, AudioConverterInputDataProc inInputDataProc, void*inInputDataProcUserData, UInt32*ioOutputDataSize, void*outOutputData);
inAudioConverter
- The AudioConverter to use.
inInputDataProc
- A callback function which supplies the input data.
inInputDataProcUserData
- A value for the use of the callback function.
ioOutputDataSize
- On entry, the size of the buffer pointed to by outOutputData. On exit, the number of bytes written to outOutputData
outOutputData
- The buffer into which the converted data is written.
Produces a buffer of output data from an AudioConverter. The supplied input
callback function is called whenever necessary.
NOTE: AudioConverterFillBuffer is limited to simpler conversions
that do not involve multiple deinterleaved buffers or packetized
formats. Use AudioConverterFillComplexBuffer for those cases.
AudioConverterConvertBuffer |
Converts data from an input buffer to an output buffer.
extern OSStatus AudioConverterConvertBuffer( AudioConverterRef inAudioConverter, UInt32 inInputDataSize, const void*inInputData, UInt32*ioOutputDataSize, void*outOutputData);
inAudioConverter
- The AudioConverter to use.
inInputDataSize
- The size of the buffer inInputData.
inInputData
- The input audio data buffer.
ioOutputDataSize
- On entry, the size of the buffer outOutputData. On exit, the number of bytes written to outOutputData.
outOutputData
- The output data buffer.
AudioConverterFillComplexBuffer |
Converts data supplied by an input callback function, supporting non-interleaved and packetized formats.
extern OSStatus AudioConverterFillComplexBuffer( AudioConverterRef inAudioConverter, AudioConverterComplexInputDataProc inInputDataProc, void*inInputDataProcUserData, UInt32*ioOutputDataPacketSize, AudioBufferList*outOutputData, AudioStreamPacketDescription*outPacketDescription) ;
inAudioConverter
- The AudioConverter to use.
inInputDataProc
- A callback function which supplies the input data.
inInputDataProcUserData
- A value for the use of the callback function.
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.
outOutputData
- The converted output data is written to this buffer.
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).
Produces a buffer list of output data from an AudioConverter. The supplied input callback function is called whenever necessary.
(Last Updated July 18, 2005)