Saturday 15 March 2014

iPhone - prepend data to beginning of an audio file -


I am trying to write some data at the beginning of an audio file. But the file is overwriting. If I write 20 seconds of data to start the audio file using AudioFileWritePackets, then the data of the initial 20 seconds is overwritten in the original audio file.

This is what I use

  audiofile open URL ((CFRRF) Floor, audiofiledreaddreampromotion, 0, and audio); // Start your 20 second data in the Buffer AudioFileWare Cakecat (Audiide, Falls, NumbytesTowWight, Faucet, 0, and PacketWoWite, PackBuffer); Can anyone tell me how I can get it (include 20 second audio in original audio file) 

Thanks.

Div>

You need to open a new file, write it to your new data, and then copy the old audio Old file at the end of the new file.


No comments:

Post a Comment