首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在iPhone上录制“苹果无损”音频

问在iPhone上录制“苹果无损”音频
EN

Stack Overflow用户
提问于 2009-05-17 19:06:12
回答 3查看 3.3K关注 0票数 2

你能给我介绍一下文档/片段/博客,它们解释了如何在iPhone上录制苹果无损音频文件吗?

我已经检查了来自Apple Dev Center的录音器示例,但不能确定我使用了哪种设置来实现无损音频。

致以敬意,

斯特凡

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2009-05-20 15:42:19

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

苹果无损- kAudioFormatAppleLossless

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

IMA/ADPCM (又称IMA4) - kAudioFormatAppleIMA4

µ法律- kAudioFormatULaw

aLaw - kAudioFormatALaw

代码语言:javascript
复制
- (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

票数 6
EN

Stack Overflow用户

发布于 2009-05-17 19:55:50

请看苹果iPhone开发人员中心上的SpeakHere示例。

票数 0
EN

Stack Overflow用户

发布于 2015-03-22 22:25:25

我使用.aiff的iTalk录像机高级版(未压缩),然后导出到笔记本电脑,并使用flac压缩它-它默认保留时间戳。

代码语言:javascript
复制
flac --best *.aiff
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/875252

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档