I am using theamazingaudioengine for recording, playing and adding effects like reverb for an iOS app. I can record, play the recorded audio along with the reverb effect. But I am unable to save audio file with the reverb effect to the gallery. Can any one please help me with this.
I am saving the recorded audio like this.
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
NSArray *documentsFolders = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [[documentsFolders objectAtIndex:0] stringByAppendingPathComponent:@"Recording.aiff"];
[library writeVideoAtPathToSavedPhotosAlbum:[NSURL URLWithString:path] completionBlock:^(NSURL *assetURL, NSError *error){
/*notify of completion*/
NSLog(@"AssetURL: %@",assetURL);
NSLog(@"Error: %@",error);
if (!error) {
//video saved
[[self appDelegate] showAlertWithTitle:@"Audio Saved" message:@""];
}
else{
[[self appDelegate] showAlertWithTitle:@"Error" message:error.domain];
}
}];
Thanks in advance!