AVAudioRecorder won't record IF movie was previously recorded & played

前端 未结 6 1796
无人共我
无人共我 2021-02-02 02:17

My iPhone app uses \"AVAudioRecorder\" to make voice recordings. It also uses \"UIImagePickerController\" to record movies and \"MPMoviePlayerController\" to play movies.

6条回答
  •  一向
    一向 (楼主)
    2021-02-02 02:39

    I had the same problem in Monotouch and adjusted rmomins answer for Monotouch.

    changed

    avrecorder.Record();
    

    to

    NSError error;
    var avsession = AVAudioSession.SharedInstance();
    avsession.SetCategory(AVAudioSession.CategoryRecord,out error);
    
    avrecorder.Record();
    

    Works like a charm.

提交回复
热议问题