循环缓冲区音频录制iOS:可能吗? [英] Circular Buffer Audio Recording iOS: Possible?

查看:63
本文介绍了循环缓冲区音频录制iOS:可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一个客户想要连续录制音频,当他单击提交"时,他只想提交最后10秒钟.因此,他想要一个连续的记录,并且只保留最后的x秒.

A client of mine wants to continually record audio and when he clicks submit he wants to submit the last 10 seconds only. So he wants a continual recording and only keeping the last x seconds.

我认为这需要循环缓冲区之类的东西,但是(作为iOS的新手)看起来AVAudioRecorder只能写入文件.

I would think this requires something like a circular buffer, but (as a somewhat newbie for iOS) it looks like AVAudioRecorder can only write to a file.

我是否有实现此目的的选择?

Are there any options for me to implement this?

任何人都可以指点吗?

推荐答案

我会使用音频队列服务.这将使您隔离缓冲区的某些部分.这是它的指南:

I would use the Audio Queue Services. This will allow you isolate certain parts of the buffer. Here is the guide to it: http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQRecord/RecordingAudio.html#//apple_ref/doc/uid/TP40005343-CH4-SW1

这篇关于循环缓冲区音频录制iOS:可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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