Recording to and play from simultaneously from same file.

I'm trying to record from the microphone and playback the audio time shifted back a few seconds. Similar to delay, but time shifted by a few minutes if needed. For the most part it's easy. I can record no problem, and play that recorded file back as long as I stop recording first.

When I try to play the file back while still recording, it's failing. A few minutes in the debugger and I discovered that the AudioFileGetProperty of kAudioFilePropertyAudioDataPacketCount is returning 0. This is line 179 of AEAudioFilePlayer.m.

It seems like I need a stream player as the source length isn't known at the start, but I don't see one. Is there a way to do this?

Sign In or Register to comment.