AudioConverterPropertyID |
The properties of an AudioConverter, accessible via AudioConverterGetProperty() and AudioConverterSetProperty().
enum // typedef UInt32 AudioConverterPropertyID { kAudioConverterPropertyMinimumInputBufferSize = 'mibs', kAudioConverterPropertyMinimumOutputBufferSize = 'mobs', kAudioConverterPropertyMaximumInputBufferSize = 'xibs', kAudioConverterPropertyMaximumInputPacketSize = 'xips', kAudioConverterPropertyMaximumOutputPacketSize = 'xops', kAudioConverterPropertyCalculateInputBufferSize = 'cibs', kAudioConverterPropertyCalculateOutputBufferSize = 'cobs', kAudioConverterPropertyInputCodecParameters = 'icdp', kAudioConverterPropertyOutputCodecParameters = 'ocdp', kAudioConverterSampleRateConverterAlgorithm = 'srci', kAudioConverterSampleRateConverterQuality = 'srcq', kAudioConverterCodecQuality = 'cdqu', kAudioConverterPrimeMethod = 'prmm', kAudioConverterPrimeInfo = 'prim', kAudioConverterChannelMap = 'chmp', kAudioConverterDecompressionMagicCookie = 'dmgc', kAudioConverterCompressionMagicCookie = 'cmgc', kAudioConverterEncodeBitRate = 'brat', kAudioConverterEncodeAdjustableSampleRate = 'ajsr', kAudioConverterInputChannelLayout = 'icl ', kAudioConverterOutputChannelLayout = 'ocl ', kAudioConverterApplicableEncodeBitRates = 'aebr', kAudioConverterAvailableEncodeBitRates = 'vebr', kAudioConverterApplicableEncodeSampleRates = 'aesr', kAudioConverterAvailableEncodeSampleRates = 'vesr', kAudioConverterAvailableEncodeChannelLayoutTags = 'aecl', kAudioConverterCurrentOutputStreamDescription = 'acod', kAudioConverterCurrentInputStreamDescription = 'acid', kAudioConverterPropertySettings = 'acps', kAudioConverterPropertyBitDepthHint = 'acbd' };
kAudioConverterPropertyMinimumInputBufferSize
- a UInt32 that indicates the size in bytes of the smallest buffer of input data that can be supplied via the AudioConverterInputProc or as the input to AudioConverterConvertBuffer
kAudioConverterPropertyMinimumOutputBufferSize
- a UInt32 that indicates the size in bytes of the smallest buffer of output data that can be supplied to AudioConverterFillBuffer or as the output to AudioConverterConvertBuffer
kAudioConverterPropertyMaximumInputBufferSize
- a UInt32 that indicates the size in bytes of the largest buffer of input data that will be requested from the AudioConverterInputProc. This is mostly useful for variable bit rate compressed data. This will be equal to 0xFFFFFFFF if the maximum value depends on what is requested from the output, which is usually the case for constant bit rate formats.
kAudioConverterPropertyMaximumInputPacketSize
- a UInt32 that indicates the size in bytes of the largest single packet of data in the input format. This is mostly useful for variable bit rate compressed data (decoders).
kAudioConverterPropertyMaximumOutputPacketSize
- a UInt32 that indicates the size in bytes of the largest single packet of data in the output format. This is mostly useful for variable bit rate compressed data (encoders).
kAudioConverterPropertyCalculateInputBufferSize
- a UInt32 that on input holds a size in bytes that is desired for the output data. On output, it will hold the size in bytes of the input buffer required to generate that much output data. Note that some converters cannot do this calculation.
kAudioConverterPropertyCalculateOutputBufferSize
- a UInt32 that on input holds a size in bytes that is desired for the input data. On output, it will hold the size in bytes of the output buffer required to hold the output data that will be generated. Note that some converters cannot do this calculation.
kAudioConverterPropertyInputCodecParameters
- The value of this property varies from format to format and is considered private to the format. It is treated as a buffer of untyped data.
kAudioConverterPropertyOutputCodecParameters
- The value of this property varies from format to format and is considered private to the format. It is treated as a buffer of untyped data.
kAudioConverterSampleRateConverterAlgorithm
- DEPRECATED: please use kAudioConverterSampleRateConverterQuality instead
An OSType that specifies the sample rate converter to use (as defined in AudioUnit/AudioUnitProperties.h -- for now only Apple SRC's can be used)kAudioConverterSampleRateConverterQuality
- A UInt32 that specifies rendering quality of the sample rate converter (see enum constants below)
kAudioConverterCodecQuality
- A UInt32 that specifies rendering quality of a codec (see enum constants below)
kAudioConverterPrimeMethod
- a UInt32 specifying priming method (usually for sample-rate converter) see explanation for struct AudioConverterPrimeInfo below along with enum constants
kAudioConverterPrimeInfo
- A pointer to AudioConverterPrimeInfo (see explanation for struct AudioConverterPrimeInfo below)
kAudioConverterChannelMap
- An array of SInt32's. The size of the array is the number of output channels, and each element specifies which input channel's data is routed to that output channel (using a 0-based index of the input channels), or -1 if no input channel is to be routed to that output channel. The default behavior is as follows. I = number of input channels, O = number of output channels. When I > O, the first O inputs are routed to the first O outputs, and the remaining puts discarded. When O > I, the first I inputs are routed to the first O outputs, and the remaining outputs are zeroed.
A simple example for splitting mono input to stereo output (instead of routing the input to only the first output channel):// this should be as large as the number of output channels: SInt32 channelMap[2] = { 0, 0 }; AudioConverterSetProperty(theConverter, kAudioConverterChannelMap, sizeof(channelMap), channelMap);kAudioConverterDecompressionMagicCookie
- A void * pointing to memory set up by the caller. Required by some formats in order to decompress the input data.
kAudioConverterCompressionMagicCookie
- A void * pointing to memory set up by the caller. Returned by the converter so that it may be stored along with the output data. It can then be passed back to the converter for decompression at a later time.
kAudioConverterEncodeBitRate
- A UInt32 containing the number of bits per second to aim for when encoding data. This property is only relevant to encoders.
kAudioConverterEncodeAdjustableSampleRate
- For encoders where the AudioConverter was created with an output sample rate of zero, and the codec can do rate conversion on its input, this provides a way to set the output sample rate. The property value is a Float64.
kAudioConverterInputChannelLayout
- The property value is an AudioChannelLayout.
kAudioConverterOutputChannelLayout
- The property value is an AudioChannelLayout.
kAudioConverterApplicableEncodeBitRates
- The property value is an array of AudioValueRange describing applicable bit rates based on current settings.
kAudioConverterAvailableEncodeBitRates
- The property value is an array of AudioValueRange describing available bit rates based on the input format. You can get all available bit rates from the AudioFormat API.
kAudioConverterApplicableEncodeSampleRates
- The property value is an array of AudioValueRange describing applicable sample rates based on current settings.
kAudioConverterAvailableEncodeSampleRates
- The property value is an array of AudioValueRange describing available sample rates based on the input format. You can get all available sample rates from the AudioFormat API.
kAudioConverterAvailableEncodeChannelLayoutTags
- The property value is an array of AudioChannelLayoutTags for the format and number of channels specified in the input format going to the encoder.
kAudioConverterCurrentOutputStreamDescription
- Returns the current completely specified output AudioStreamBasicDescription. For example when encoding to AAC, your original output stream description will not have been completely filled out.
kAudioConverterCurrentInputStreamDescription
- Returns the current completely specified input AudioStreamBasicDescription.
kAudioConverterPropertySettings
- Returns the a CFArray of property settings for converters.
kAudioConverterPropertyBitDepthHint
- A UInt32 of the source bit depth to preserve. This is a hint to some encoders like lossless about how many bits to preserve in the input. The converter usually tries to preserve as many as possible, but a lossless encoder will do poorly if more bits are supplied than are desired in the output.
Quality constants |
Constants to be used with kAudioConverterSampleRateConverterQuality.
enum { kAudioConverterQuality_Max = 0x7F, kAudioConverterQuality_High = 0x60, kAudioConverterQuality_Medium = 0x40, kAudioConverterQuality_Low = 0x20, kAudioConverterQuality_Min = 0 };
kAudioConverterQuality_Max
- maximum quality
kAudioConverterQuality_High
- high quality
kAudioConverterQuality_Medium
- medium quality
kAudioConverterQuality_Low
- low quality
kAudioConverterQuality_Min
- minimum quality
Prime method constants |
Constants to be used with kAudioConverterPrimeMethod.
enum { kConverterPrimeMethod_Pre = 0, kConverterPrimeMethod_Normal = 1, kConverterPrimeMethod_None = 2 };
kConverterPrimeMethod_Pre
- Primes with leading + trailing input frames.
kConverterPrimeMethod_Normal
- Only primes with trailing (zero latency). Leading frames are assumed to be silence.
kConverterPrimeMethod_None
- Acts in "latency" mode. Both leading and trailing frames assumed to be silence.
(Last Updated July 18, 2005)