AVAudioRecorder支持录制声音的格式是什么? [英] what are the formats supported in AVAudioRecorder for recording sound?

查看:926
本文介绍了AVAudioRecorder支持录制声音的格式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 http://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/CoreAudioDataTypesRef/Reference/reference.html#//apple_ref / doc / uid / TP40004488

音频数据格式标识符
音频数据格式的标识符,用于AudioStreamBasicDescription结构。

Audio Data Format Identifiers Identifiers for audio data formats, used in the AudioStreamBasicDescription structure.

kAudioFormatLinearPCM ='lpcm',

kAudioFormatLinearPCM = 'lpcm',

kAudioFormatAC3 ='ac-3',

kAudioFormatAC3 = 'ac-3',

kAudioFormat60958AC3 ='cac3',

kAudioFormat60958AC3 = 'cac3',

kAudioFormatAppleIMA4 ='ima4',

kAudioFormatAppleIMA4 = 'ima4',

kAudioFormatMPEG4AAC ='aac ',

kAudioFormatMPEG4AAC = 'aac ',

kAudioFormatMPEG4CELP ='celp',

kAudioFormatMPEG4CELP = 'celp',

kAudioFormatMPEG4HVXC ='hvxc',

kAudioFormatMPEG4HVXC = 'hvxc',

kAudioFormatMPEG4TwinVQ ='twvq',

kAudioFormatMPEG4TwinVQ = 'twvq',

kAudioFormatMACE3 ='MAC3',

kAudioFormatMACE3 = 'MAC3',

kAudioFormatMACE6 ='MAC6',

kAudioFormatMACE6 = 'MAC6',

kAudioFormatULaw ='ulaw',

kAudioFormatULaw = 'ulaw',

kAudioFormatALaw ='alaw',

kAudioFormatALaw = 'alaw',

kAudioFormatQDesign ='QDMC',

kAudioFormatQDesign = 'QDMC',

kAudioFormatQDesign2 ='QDM2 ',

kAudioFormatQDesign2 = 'QDM2',

kAudioFormatQUALCOMM ='Qclp',

kAudioFormatQUALCOMM = 'Qclp',

kAudioFormatMPEGLayer1 ='。mp1',

kAudioFormatMPEGLayer1 = '.mp1',

kAudioFormatMPEGLayer2 ='。mp2',

kAudioFormatMPEGLayer2 = '.mp2',

kAudioFormatMPEGLayer3 ='。mp3',

kAudioFormatMPEGLayer3 = '.mp3',

kAudioFormatTimeCode ='time',

kAudioFormatTimeCode = 'time',

kAudioFormatMIDIStream ='midi',

kAudioFormatMIDIStream = 'midi',

kAudioFormatParameterValueStream ='apvs ',

kAudioFormatParameterValueStream = 'apvs',

kAudioF ormatAppleLossless ='alac'

kAudioFormatAppleLossless = 'alac'

kAudioFormatMPEG4AAC_HE ='aach',

kAudioFormatMPEG4AAC_HE = 'aach',

kAudioFormatMPEG4AAC_LD ='aacl',

kAudioFormatMPEG4AAC_LD = 'aacl',

kAudioFormatMPEG4AAC_ELD ='aace',

kAudioFormatMPEG4AAC_ELD = 'aace',

kAudioFormatMPEG4AAC_HE_V2 ='aacp',

kAudioFormatMPEG4AAC_HE_V2 = 'aacp',

kAudioFormatMPEG4AAC_Spatial ='aacs',

kAudioFormatMPEG4AAC_Spatial = 'aacs',

kAudioFormatAMR ='samr',

kAudioFormatAMR = 'samr',

kAudioFormatAudible ='AUDB ',

kAudioFormatAudible = 'AUDB',

kAudioFormatiLBC ='ilbc',

kAudioFormatiLBC = 'ilbc',

kAudioFormatDVIIntelIMA = 0x6D730011,

kAudioFormatDVIIntelIMA = 0x6D730011,

kAudioFormatMicrosoftGSM = 0x6D730031,

kAudioFormatMicrosoftGSM = 0x6D730031,

kAudioFormatAES3 ='aes3'

kAudioFormatAES3 = 'aes3'

但是,我不这样做我们认为我们可以使用所有提到的格式(例如mp3)。

However, I dont think we can use all the formats mentioned (e.g. mp3).

任何人都可以帮我解决使用AVAudioRecorder录制声音所支持的格式吗?

Can anyone help me out with the formats that are supported for recording sound using AVAudioRecorder ?

谢谢。

推荐答案

根据苹果文档 Apple Core Audio Format Specification 1.0 它现在应该支持mp3虽然我还没有测试过,这是他们支持的当前枚举:

As per apple docs Apple Core Audio Format Specification 1.0 it should now support mp3 although I haven't tested it, this is the current enumeration they support:

enum {
    kAudioFormatLinearPCM      = 'lpcm',
    kAudioFormatAppleIMA4      = 'ima4',
    kAudioFormatMPEG4AAC       = 'aac ',
    kAudioFormatMACE3          = 'MAC3',
    kAudioFormatMACE6          = 'MAC6',
    kAudioFormatULaw           = 'ulaw',
    kAudioFormatALaw           = 'alaw',
    kAudioFormatMPEGLayer1     = '.mp1',
    kAudioFormatMPEGLayer2     = '.mp2',
    kAudioFormatMPEGLayer3     = '.mp3',
    kAudioFormatAppleLossless  = 'alac'
};

这篇关于AVAudioRecorder支持录制声音的格式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆