Sen The Amazing Audio Engine kullanarak deneyebilirsiniz. Olarak git
git clone --depth=1 https://github.com/TheAmazingAudioEngine/TheAmazingAudioEngine.git
ses this yardımıyla bir dosyaya kaydedilir olabilir yoluyla Cocoapods
pod 'TheAmazingAudioEngine'
veya klon yoluyla yükleyebilirsiniz.
Yani uygulamalar çıkışını kaydetmek isterseniz sadece kullanım bir Outputreceiver:
@property (nonatomic, strong) AEAudioController *audioController;
@property (nonatomic, strong) AERecorder *recorder;
...
self.audioController = [[AEAudioController alloc] initWithAudioDescription:[AEAudioController nonInterleaved16BitStereoAudioDescription] inputEnabled:YES];
...
//start the recording
- (void) beginRecording{
self.recorder = [[AERecorder alloc] initWithAudioController:self.audioController];
NSString *documentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
//the path to record to
NSString *filePath = [documentsFolder stringByAppendingPathComponent:@"AppOutput.aiff"];
//start recording
NSError *error = NULL;
if (![_recorder beginRecordingToFileAtPath:filePath fileType:kAudioFileAIFFType error:&error]) {
//an error occured
return;
}
[self.audioController addOutputReceiver:self.recorder];
}
...
//end the recording
- (void)endRecording {
[self.audioController removeOutputReceiver:self.recorder];
[self.recorder finishRecording];
}
Bu harika bir soru! –