Я хочу объединить два файла записи .wav вместе. Может ли кто-нибудь помочь мне выяснить, как этого добиться. Я попытался объединить данные, но заголовки создают проблему. Можем ли мы выполнить объединение, как мы это делаем для объединения файлов wave.
Вот как я делаю комбайн,
NSMutableData *datas = [NSMutableData alloc];
NSData *data1 = [NSData dataWithContentsOfFile: [recordedTmpFile1 path]];
NSData *data2 = [NSData dataWithContentsOfFile: [recordedTmpFile2 path]];
NSLog(@"file1 size : %d", [data1 length]);
NSLog(@"file2 size : %d", [data2 length]);
[datas appendData:data1];
[datas appendData:data2];
NSLog(@"file3 size : %d", [datas length]);
NSURL *combinedPath = [NSURL alloc];
combinedPath = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:
[NSString stringWithFormat: @"1_20111215.%@",@"wav"]]];
[[NSFileManager defaultManager] createFileAtPath:[combinedPath path] contents:datas attributes:nil];
NSFileManager * fm = [NSFileManager defaultManager];
[fm removeItemAtPath:[recordedTmpFile2 path] error:nil];