I need to pause and then resume an audio recording, I'm using AVAudioRecorder for my recording sessions... Anyone knows how to do this? Any help will be higly appreciated! Thanks a lot Peace Massy
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
After initializing and creating an object of AVAudioRecorder
, lets say AVAudioRecorder *recorder
, simply call [recorder record]
to record and [recorder pause]
to pause.
If you are calling record and pause in separate method e.g. on click of different buttons then you need to make recorder
a class level variable.
回答2:
To pause the recording, use the following methods on AVAudioRecorder
:
- (void)pause
and to resume, use:
- (BOOL)record
It's all here in the docs...