tags:

views:

35

answers:

0

Hi,

I have used below code to combine two .caf files.

NSMutableData *datas = [NSMutableData alloc];
NSData *data1 = [NSData dataWithContentsOfFile:path1];
NSData *data2 = [NSData dataWithContentsOfFile:path2];
NSLog(@"file1 size  : %d", [data1 length]);
NSLog(@"file2 size : %d", [data2 length]);
[datas appendData:data1];
[datas appendData:data2];
NSLog(@"file3 size  : %d", [datas length]);
[[NSFileManager defaultManager] createFileAtPath:combinedPath contents:datas attributes:nil];

Problem is; I can able to combine two files. But when I try to play the combined file, it is playing only the first file content.

Please help me to resolve it.

Thanks.