AVAudioRecorder freezes when paused too many times before a stop
I have noticed that 开发者_StackOverflow中文版AVAudioRecorder (iOS) hangs when I pause and resume 8 or more times during the recording. On the simulator it hangs indefinitely, and on the device I get this errors:
AudioQueueStop posting message to kill mediaserverd
Does anyone know how to prevent this, or is there a workaround? My problem is that I try to load the file into AVAudioPlayer afterward and the resulting loaded file has no duration (and doesn't play). The strange thing is that I am able to save the file and later play it just fine. I'm not certain yet at what point the file is playable, but was hoping if there is a solution to the issue with the recorder, I won't need a workaround.
I've got the same same problem and I thought i had found a workaround, it seems to work for small recordings, but it still freezes for longer ones:
[NSThread detachNewThreadSelector:@selector(stop) toTarget:myrecorder withObject:nil]
maybe it can work for you if you're lucky, have you filed a bug report? i'll file one now
精彩评论