Hi ,
Here is my code.Here i am writing content of first file to second but second file doesn't contain any data.
NSData *pcmData = [NSData dataWithContentsOfFile:sourceFile];
unsigned int length = [pcmData length] / sizeof( float );
UInt32 inBytesLength = length * audioFormat.mBytesPerFrame;
UInt32 maxPacketSize;
UInt32 propertySize = sizeof (maxPacketSize);
AudioFileGetProperty (audioFileID,AudioFilePropertyPacketSizeUpperBound,&propertySize,&maxPacketSize);
SInt16 startingByte = 0;
void *Buffer = malloc(inBytesLength);
void *newBuffer;
sts = AudioFileReadBytes(fileID,NO,startingByte,&inBytesLength, Buffer);
//Writing part
AudioFileWriteBytes(newFileID,NO,startingByte,&inBytesLength,newBuffer);