ios - Core Audio - Write data to beginning or middle of audio file (somewhere other than the end) -


so, have audio recording ios app working on. in app have need write audio @ point in file (in documents directory) user chooses, overwrite whatever audio there.

example: record 3 min of audio, scroll minute two, start recording again 10 seconds. now, 2:00 - 2:10 contains new audio, , old audio gone (the audio file not longer in example).

i using ezaudio , can record , pause many times want , keep appending end. going use extaudiofileseek seek backward in file , record there, can use when file open read-only.

what don't want: don't want record different file, , append 2 files using method: https://stackoverflow.com/a/10562809/1391672 there significant loading time associated this. ios app voice memos appends files instantaneously.

can extaudiofilewriteasync used append audio @ beginning? or @ specified sample location? there method should at?

i think extaudiofileseek undefined when recording. use audiofile api extaudiofile built upon. catch have own format conversions (i use audioconverterref if necessary). once you've got of squared away can call audiofilewritepackets takes instartingpacket argument can write anywhere in file. can wrap audiofileref in extaudiofileref playback while file still open recording using extaudiofilewrapaudiofileid. headers in audiofile.h , audioconverter.h.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -