rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

Audio not recorded occasionally #370

Open jamesfzhang opened 7 years ago

jamesfzhang commented 7 years ago

Has anyone experienced audio not getting recorded every once in a while? I can't seem to reproduce this error consistently. I am doing a few things with AVAudioSession to enable background audio, but again the inconsistency in which no audio gets recorded is baffling.

I'm using AVAudioSessionCategoryPlayAndRecord with [.mixWithOthers, .defaultToSpeaker] options. Thanks!

mysteriouss commented 7 years ago

try -[SCRecorder unprepare] instead of just -[SCRecorder stopRunning] the AVCaptureSession after receiving UIApplicationWillResignActiveNotification ?

rordeix commented 7 years ago

It happened to me, some time ago, I did set fastRecordMethodEnabled = true, and while recording, if you got quiet for while at the start, then no sound was recorded at all. If you start talking or making sounds at the start of the recording then it worked just fine. Make sure you are not setting it to true

moosebay commented 7 years ago

I had the same issue. I am using swift 3. try to disable keepMirroringOnWrite if you have enabled it. recorder.keepMirroringOnWrite = false