playing a growing file
playing a growing file
- Subject: playing a growing file
- From: Matthew Pease <email@hidden>
- Date: Fri, 24 Jul 2015 18:44:56 +0200
Hi all -
I've searched for a previous answer to this question, but did not find one.
In my IOS app, I record a stream to a file. I then want to provide playback access to that file starting from any offset. The user can listen to any part of that file by dragging a slider.
The problem is that the file is continuously growing while the new stream data arrives & is appended to the file.
ExtAudioFileSeek says that its behavior is undefined for files that are open for writing. Also when I play the file back, I might move past a point which was the end of the file when the file was originally opened.
I suppose one way I could do it would be to continuously close & open the file. open to write, then close it. And then open it again to read the next part of the stream. I can make the file an uncompressed format so that seeking within the file will be fast.
Does this sound like a good plan? Any other possibilties?
Thank you-
Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden