Closed swaroopbutala closed 9 years ago
I'm seeing the same thing! Although to me it's more like 1/100. I think the issue is memory related but I can't reliably reproduce to know for sure.
Hey guys, sorry I've been away. I'm slowly refactoring EZAudio on the play_file_cleanup
branch, but I don't think any of that involves a fix for this. Though, it sounds like a mismatch between sample rates, can you verify the AudioStreamBasicDescription on the EZOutput and EZMicrophone is the same? Also, is this iOS or Mac?
This is iOS for me. I'm playing it back with an AVAudioPlayer though. This is how I'm setting up the recorder with mic. Anything else you'd want to see that could help?
self.ezrecorder = [EZRecorder recorderWithDestinationURL:recordingPath
sourceFormat:self.ezmicrophone.audioStreamBasicDescription
destinationFileType:EZRecorderFileTypeM4A];
Ok, is it happening on the actual device or simulator or both kinda equally?
Definitely devices and I've been able to repro in sim as well.
Thanks @syedhali
Same for me too. I am working on iOS, I am using swift though. For me it happens only on phone, never seen happen on simulator.
I am not really using EZOutput anywhere though. I followed https://github.com/syedhali/EZAudio/tree/master/EZAudioExamples/iOS/EZAudioRecordExample
Here is how I create my recorder.
self.recorder = EZRecorder(destinationURL: recordingFileUrl, sourceFormat: self.microphone.audioStreamBasicDescription(), destinationFileType: EZRecorderFileType.M4A)
One thing worth noting is that I'm playing an AVAudioPlayer in the background the same time as I'm recording. Think that has anything to do with it?
If it gives you an idea, it feels to me like this issue only appears if my CPU is working hard. I'm using EZAudioPlot to show microphone activity and I think every time I've seen this issue the UI seems to be choking a bit.
I am using EZAudioPlot too.
On Tuesday, May 5, 2015, ogoldfinger notifications@github.com wrote:
If it gives you an idea, it feels to me like this issue only appears if my CPU is working hard. I'm using EZAudioPlot to show microphone activity and I think every time I've seen this issue the UI seems to be choking a bit.
— Reply to this email directly or view it on GitHub https://github.com/syedhali/EZAudio/issues/152#issuecomment-99180796.
Swaroop
One thing I just tried which looks like it may have fixed this issue is delaying the initialization of the microphone to viewDidAppear from viewDidLoad. Swaroop -- may be worth you trying the same and see if that worked for you.
(void) viewDidAppear:(BOOL)animated { [super viewDidAppear:animated];
if(!self._microphone) { self._microphone = [EZMicrophone microphoneWithDelegate:self]; } }
I'm wondering if this was happening because the previous version of the EZAudioPlot before the 0.2.0 was pretty CPU intensive. Could you update your EZAudio version to 0.2.0 or later and try to reproduce this issue?
I can't seem to reproduce so I'm going to close this for now. Feel free to reopen if you update EZAudio to at least 0.7.1 and still experience the same issues.
Hello @syedhali ,
Thanks for writing this library! I am seeing interesting behavior in my app. For the most part the library works like a charm when I am recording audio using the library. But at times (may be 1/10) it records audio in fast forward mode. So if I think I have recorded 30 secs, it actually records it in ~2x speed, so my output audio is ~15 secs.
I tried a whole bunch of debugging but am not able to figure out what the issue could be. Have you ever seen such behavior? Thoughts?