녹음 된 파일을 내 앱 문서에 저장하고 싶지만 어떻게해야하는지 알 수 없습니다. 녹음을했고 임시 파일에 저장되어있어 그 사운드를 재생할 수 있습니다. 이제 그 파일을 새로운 이름으로 저장하고 싶습니다.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];
이 어떻게 해야할지 중 하나를 수행하거나이 작업을 수행하는 경우에도 가능하다면 :
코드는 사운드를 녹음하기 위해?