开发者

iphone sdk: Core Audio How to continue recording to file after user stops recording by leaving the application and then re-opens it?

The iPhone's AVAudioRecorder class will not allow you to open an existing file to continue a recording. Instead, it overwrites it. I'd like to know an approach that would allow me to 开发者_如何学运维continue recording to an existing file using Core Audio APIs.


The best bet would be to take a look at the Audio Queue Services API. This is basically the next "deeper" level into the Core Audio stack provided by Apple. Unfortunately, the chasm between AVAudioRecorder and Audio Queue Services is vast. AQS is a C-based API and a fairly low level abstraction of the even more "raw" lowest levels of Core Audio. I would suggest reviewing the guide above, then taking a look at the example SpeakHere. It should easily be able to handle your current requirement.

No matter which API, you will have to handle the "intermediate" storage of your PCM data, probably temporarily storing it as a WAV or raw PCM, which you then reload and append with PCM data when continuing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜