问题描述
我的一个客户想要连续录制音频,当他单击提交"时,他只想提交最后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?
任何人都可以指点吗?
推荐答案
我会使用音频队列服务.这将使您隔离缓冲区的某些部分.这是它的指南: http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQRecord/RecordingAudio.html#//apple_ref/doc/uid/TP40005343- CH4-SW1
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:可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!