Class

AVAudioConverter

A class that converts streams of audio between various formats.

Declaration

@interface AVAudioConverter : NSObject

Topics

Creating an Audio Converter

- initFromFormat:toFormat:

Initializes an audio converter from input and output formats.

Converting Audio Formats

- convertToBuffer:error:withInputFromBlock:

Performs any supported conversion.

- convertToBuffer:fromBuffer:error:

Performs a simple conversion that doesn't involve codecs or sample rate conversion.

Resetting an Audio Converter

- reset

Resets the converter so that a new stream can be converted.

Getting Audio Converter Properties

channelMap

An array of integers indicating from which input to derive each output.

dither

A Boolean value that indicates whether dither is on.

downmix

A Boolean value that indicates whether the channels will be mixed instead of remapped.

inputFormat

The format of the input audio stream.

outputFormat

The format of the output audio stream.

magicCookie

An object that contains metadata required by encoders and decoders.

maximumOutputPacketSize

The maximum size of an output packet, in bytes.

Getting Bit Rate Properties

applicableEncodeBitRates

When encoding, an array of bit rates that can be applied based on the current formats and settings.

availableEncodeBitRates

When encoding, an array of all bit rates provided by the codec.

availableEncodeChannelLayoutTags

When encoding, an array of all output channel layout tags provided by the codec.

bitRate

The bit rate, in bits per second.

bitRateStrategy

An AVEncoderBitRateStrategyKey value constant used during encoding.

Getting Sample Rate Properties

sampleRateConverterQuality

An AVSampleRateConverterAlgorithmKey value.

sampleRateConverterAlgorithm

The priming method to be used by the sample rate converter or decoder.

applicableEncodeSampleRates

When encoding, an array of output sample rates that can be applied based on the current formats and settings.

availableEncodeSampleRates

When encoding, an array of all output sample rates provided by the codec.

Getting Priming Information

primeInfo

The number of priming frames.

primeMethod

The priming method to be used by the sample rate converter or decoder.

AVAudioConverterPrimeInfo

Priming information for audio conversion.

Constants

AVAudioConverterInputStatus

Status codes returned by AVAudioConverterInputBlock.

AVAudioConverterOutputStatus

Status codes returned by convertToBuffer:error:withInputFromBlock:.

AVAudioConverterPrimeMethod

Values for the primeMethod property.

Relationships

Inherits From

See Also

Audio Helpers

AVAudioConverterInputBlock

A block to get input data as needed, for conversion.

AVAudioUnitComponent

A class that provides details about an audio unit such as: type, subtype, manufacturer, and location.

AVAudioUnitComponentManager

An object that provides a way to search and query audio components that are registered with the system.