How to pause and resume audio recording using AVAu

2019-02-18 18:33发布

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

2条回答
别忘想泡老子
2楼-- · 2019-02-18 18:48

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...

查看更多
贪生不怕死
3楼-- · 2019-02-18 19:01

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.

查看更多
登录 后发表回答