How to pause and resume audio recording using AVAudioRecorder

前端 未结 2 980
说谎
说谎 2021-01-13 23:04

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!

相关标签:
2条回答
  • 2021-01-13 23:43

    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.

    0 讨论(0)
  • 2021-01-13 23: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...

    0 讨论(0)
提交回复
热议问题