AV Foundation Audio Settings Constants

Framework
AVFoundation/AVAudioSettings.h
Declared in
AVAudioSettings.h

Overview

Use these audio settings keys to configure an AVAudioRecorder object. You can also use some of these keys to retrieve information about the sound associated with an AVAudioPlayer object, such as audio data format, sample rate, and number of channels.

Constants

General Audio Format Settings

Audio settings that apply to all audio formats handled by the AVAudioPlayer and AVAudioRecorder classes.

NSString *const AVFormatIDKey;
NSString *const AVSampleRateKey;
NSString *const AVNumberOfChannelsKey;
Constants
AVFormatIDKey

A format identifier. See the “Audio Data Format Identifiers” enumeration in Core Audio Data Types Reference.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVSampleRateKey

A sample rate, in hertz, expressed as an NSNumber floating point value.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVNumberOfChannelsKey

The number of channels expressed as an NSNumber integer value.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

Linear PCM Format Settings

Audio settings that apply to linear PCM audio formats.

NSString *const AVLinearPCMBitDepthKey;
NSString *const AVLinearPCMIsBigEndianKey;
NSString *const AVLinearPCMIsFloatKey;
NSString *const AVLinearPCMIsNonInterleaved;
Constants
AVLinearPCMBitDepthKey

An NSNumber integer that indicates the bit depth for a linear PCM audio format—one of 8, 16, 24, or 32.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVLinearPCMIsBigEndianKey

A Boolean value that indicates whether the audio format is big endian (YES) or little endian (NO).

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVLinearPCMIsFloatKey

A Boolean value that indicates that the audio format is floating point (YES) or fixed point (NO).

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVLinearPCMIsNonInterleaved

A Boolean value that indicates that the audio format is non-interleaved (YES) or interleaved (NO).

Available in iOS 4.0 and later.

Declared in AVAudioSettings.h.

Linear PCM Format Defines

Audio setting defines that apply to linear PCM audio formats.

#define AVLinearPCMIsNonInterleavedKey AVLinearPCMIsNonInterleaved
Constants
AVLinearPCMIsNonInterleavedKey

See AVLinearPCMIsNonInterleaved.

Available in iOS 4.1 and later.

Declared in AVAudioSettings.h.

Encoder Settings

Audio encoder settings for the AVAudioRecorder class.

NSString *const AVEncoderAudioQualityKey;
NSString *const AVEncoderBitRateKey;
NSString *const AVEncoderBitRatePerChannelKey;
NSString *const AVEncoderBitDepthHintKey;
Constants
AVEncoderAudioQualityKey

A constant from “Audio Quality Flags.”

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVEncoderBitRateKey

An integer that identifies the audio bit rate.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVEncoderBitRatePerChannelKey

An integer that identifies the audio bit rate per channel.

Available in iOS 4.0 and later.

Declared in AVAudioSettings.h.

AVEncoderBitDepthHintKey

An integer ranging from 8 through 32.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

Sample Rate Conversion Settings

Sample rate converter audio quality settings.

NSString *const AVSampleRateConverterAudioQualityKey;
Constants
AVSampleRateConverterAudioQualityKey

An NSNumber integer value. See “Audio Quality Flags.”

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

Channel Layout Keys

Key to retrieve channel layout information for playback.

NSString *const AVChannelLayoutKey;
Constants
AVChannelLayoutKey

The corresponding value is an NSData object containing an AudioChannelLayout structure.

Available in iOS 4.0 and later.

Declared in AVAudioSettings.h.

Sample Rate Conversion Audio Quality Flags

Keys that specify sample rate conversion quality, used for the AVSampleRateConverterAudioQualityKey property.

enum {
   AVAudioQualityMin       = 0,
   AVAudioQualityLow       = 0x20,
   AVAudioQualityMedium    = 0x40,
   AVAudioQualityHigh      = 0x60,
   AVAudioQualityMax       = 0x7F
};
typedef NSInteger AVAudioQuality;
Constants
AVAudioQualityMin

The minimum quality for sample rate conversion.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVAudioQualityLow

Low quality rate conversion.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVAudioQualityMedium

Medium quality sample rate conversion.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVAudioQualityHigh

High quality sample rate conversion.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.

AVAudioQualityMax

Maximum quality sample rate conversion.

Available in iOS 3.0 and later.

Declared in AVAudioSettings.h.


Did this document help you? Yes It's good, but... Not helpful...