【问题标题】:Record "Apple lossless" audio on the iPhone在 iPhone 上录制“Apple 无损”音频
【发布时间】:2009-05-17 19:06:12
【问题描述】:

你能告诉我 docs/sn-ps/blogs,它解释了 请问如何在iPhone上录制Apple无损音频文件?

我检查了 Apple 的录音机示例 开发中心,但不知道我有哪个设置 用于无损音频。

问候,

斯蒂芬

【问题讨论】:

    标签: iphone audio core-audio mp4


    【解决方案1】:

    iPhone OS 支持使用多种不同的压缩音频编码格式录制 .caf 文件:

    Apple Lossless - kAudioFormatAppleLossless

    iLBC(互联网低比特率编解码器)-kAudioFormatiLBC

    IMA/ADPCM(又名 IMA4)-kAudioFormatAppleIMA4

    µLaw - kAudioFormatULaw

    aLaw - kAudioFormatALaw

    - (id) initWithURL: fileURL {
        NSLog (@"initializing a recorder object.");
        self = [super init];
    
        if (self != nil) {
    
            // define the audio stream basic description for the file to record into
    
            // record audio at the current hardware sample rate
            // make sure the audio session is active before asking for properties
            UInt32 propertySize = sizeof(audioFormat.mSampleRate);
            AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareSampleRate,
                                    &propertySize,
                                    &audioFormat.mSampleRate);
    
            audioFormat.mFormatID           = kAudioFormatAppleIMA4; // record using IMA4 codec
            audioFormat.mChannelsPerFrame   = 1;
    
            AudioQueueNewInput(&audioFormat, ... );
    
            ...
    
        }
    
        return self;
    }
    

    您一定会想阅读Audio Queue Services Programming Guide

    【讨论】:

      【解决方案2】:

      查看 Apple iPhone 开发中心的 SpeakHere 示例。

      【讨论】:

      • 我已经用过 SpeakHere。但它是用于录制 CAF,遗憾的是不是 MP4 无损。无论如何,谢谢。
      【解决方案3】:

      我将 iTalk Recorder Premium 用于 .aiff(未压缩),然后导出到笔记本电脑并使用 flac 对其进行压缩 - 默认情况下会保留时间戳。

      flac --best *.aiff
      

      【讨论】:

        猜你喜欢
        • 2010-09-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-05-17
        • 2010-09-21
        • 2010-11-03
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多