「output.aif」のファイル形式を書いてみました。以下のコードを使用してパスに書き込みました。ファイルは 2 つの場所に保存され、1 つは指定したパスにあり、もう 1 つはデフォルトで画像ギャラリーに保存され、ファイルの名前は乱数です。アプリケーションを終了するときに、保存した「.aif」ファイルを保存した場所から削除しましたが、ファイルの名前がわからないため、ギャラリーに保存されたファイルを削除できませんでした。
デフォルトで発生しているギャラリーからの「aif」ファイルの保存を停止する方法はありますか。
ファイルをギャラリーに保存しない場所にファイルを保存する別のコードを提案できますか?
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library writeVideoAtPathToSavedPhotosAlbum:url completionBlock:^(NSURL *assetURL, NSError *error){
if (error) {
}
else{
NSString *outputTp = [[[NSHomeDirectory() stringByAppendingString:@"/Documents/"] stringByAppendingString:@"output.aif"] retain];
inUrl = [url retain];
outUrl = [[NSURL fileURLWithPath:outputSound] retain];
reader = [[EAFRead alloc] init];
writer = [[EAFWrite alloc] init];
self.url = outputTp;
// this thread does the processing
[NSThread detachNewThreadSelector:@selector(processThread:) toTarget:self withObject:nil];
}
}];