|
From: cocoa d. <coc...@gm...> - 2010-03-22 05:55:40
|
Hi, I am doing one mac os x project in which i need to trim the songs and mixing two songs, I have added sox unix binary to project and doing by NSTask class. I able to do trim the songs, but when i try to mix the songs then it works like concatenating. I am try to mix two songs each 60 mb and 5 minutes duration so it gives me 10 minutes and 100 mb songs after mixing the songs but i think this concatenating result. I am using following command to do, "Sox -m /Users/mac/Desktop/infile1.wav /Users/mac/Desktop/infile2.wav /Users/reubro/Desktop/Final.wav and my objective-c code is like, NSString * toolPath; toolPath = [[NSBundle mainBundle] pathForResource:@"sox" ofType:@""]; NSDictionary *defaultEnvironment = [[NSProcessInfo processInfo] environment]; NSMutableDictionary *environment = [[NSMutableDictionary alloc] initWithDictionary:defaultEnvironment]; task = [[NSTask alloc] init]; NSString *file1 = @"/Users/mac/Desktop/infile1.wav"; NSString *file2 = @"/Users/mac/Desktop/infile2.wav"; NSString *outputFile = @"/Users/mac/Desktop/Final.wav"; NSMutableArray *mArray = [[NSMutableArray alloc] init]; [mArray addObject:@"-m"]; [mArray addObject:file1]; [mArray addObject:file2]; [mArray addObject:outputFile]; [task setArguments:mArray]; [task launch]; anyone has idea that where i am wrong? Thanks. |