Hi
I am trying to write some data to the beginning of an audio file. But the file is getting overwritten. If I write data worth 20 seconds to the beginning of the audio file using AudioFileWritePackets, the initial 20 seconds of data is overwritten in the original audio file.
This is what I use
AudioFileOpenURL((CFURLRef)flUrl, kAudioFileReadWritePermission, 0, &audioId);
//initialize my 20 sec data into a buffer
AudioFileWritePackets(audioId, FALSE, numBytesToWrite, NULL, 0, &packetsToWrite, packBuffer);
Can someone please tell me how I can achieve this (prepend the 20 sec worth of audio to the original audio file)
Thanks.