yhpets
yhpets

Reputation: 87

Merging audio files ( .caf ) using xcode

I want to merge two recorded audio files (.caf)in an iphone .is there any solution?for recording am using avaudioplayer.

Upvotes: 0

Views: 1020

Answers (1)

Rahul Lalit
Rahul Lalit

Reputation: 416

answered By: MidHere

You can do it using ExtAudioFileService. In ios developer library they had provided two examples to convert one audio file to another format. In these they are opening one audio file for reading and another file for writing (converted audio). You can change or updated code to read from two files and write them to one out put file in same format(caf) or compressed format. First you have open first audio file and read every packets from it and write it to a new audio file. After finishing first audio file, close the file and open second audio file for reading. Now read every packets from second audio file and write to newly created audio file and close second audio file and new audio file.

Please find the links(1,2) for these sample codes .... Hope this helps you...and good luck. :)

Upvotes: 1

Related Questions