記録されたファイルを自分のアプリドキュメントに保存したいが、それを行う方法がわからない。私はレコーディングを行い、それは一時ファイルに保存されており、そのサウンドを再生することができます。今、私はそのファイルを新しい名前でアプリケーション文書に保存したいと思っています。iOS - 録画をアプリドキュメントに保存する
音声を録音するためのコード:
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docsDir = [dirPaths objectAtIndex:0];
NSString *soundFilePath = [docsDir
stringByAppendingPathComponent:@"tmpSound.caf"];
tempRecFile = [NSURL fileURLWithPath:soundFilePath];
NSDictionary *recSettings = [NSDictionary
dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:AVAudioQualityMin],
AVEncoderAudioQualityKey,
[NSNumber numberWithInt:16],
AVEncoderBitRateKey,
[NSNumber numberWithInt: 2],
AVNumberOfChannelsKey,
[NSNumber numberWithFloat:44100.0],
AVSampleRateKey,
nil];
recorder = [[AVAudioRecorder alloc] initWithURL:tempRecFile settings:recSettings error:nil];
[recorder setDelegate:self];
[recorder prepareToRecord];
[recorder record];
いずれかがこれを行う方法を知っているか、それがこれを行うことも可能かどうか?