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
AVFormatIDKeyA 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.AVSampleRateKeyA sample rate, in hertz, expressed as an
NSNumberfloating point value.Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.AVNumberOfChannelsKeyThe number of channels expressed as an
NSNumberinteger 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
AVLinearPCMBitDepthKeyAn
NSNumberinteger 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.AVLinearPCMIsBigEndianKeyA 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.AVLinearPCMIsFloatKeyA 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.AVLinearPCMIsNonInterleavedA 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
AVLinearPCMIsNonInterleavedKeySee
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
AVEncoderAudioQualityKeyA constant from “Audio Quality Flags.”
Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.AVEncoderBitRateKeyAn integer that identifies the audio bit rate.
Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.AVEncoderBitRatePerChannelKeyAn integer that identifies the audio bit rate per channel.
Available in iOS 4.0 and later.
Declared in
AVAudioSettings.h.AVEncoderBitDepthHintKeyAn 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
AVSampleRateConverterAudioQualityKeyAn
NSNumberinteger 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
AVChannelLayoutKeyThe corresponding value is an
NSDataobject containing anAudioChannelLayoutstructure.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
AVAudioQualityMinThe minimum quality for sample rate conversion.
Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.AVAudioQualityLowLow quality rate conversion.
Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.AVAudioQualityMediumMedium quality sample rate conversion.
Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.AVAudioQualityHighHigh quality sample rate conversion.
Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.AVAudioQualityMaxMaximum quality sample rate conversion.
Available in iOS 3.0 and later.
Declared in
AVAudioSettings.h.
© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-10-12)