1
Novocaine의 샘플 프로젝트에서 m4a 파일을 출력합니다. 하지만 iTunes에서 파일을 열 수 없습니다. 파일이 손상되었을 수 있습니다.Novocaine : 저장된 오디오 파일이 작동하지 않습니다.
NSArray *pathComponents = [NSArray arrayWithObjects:
[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject],
@"My Recording.m4a",
nil];
NSURL *outputFileURL = [NSURL fileURLWithPathComponents:pathComponents];
NSLog(@"URL: %@", outputFileURL);
self.fileWriter = [[AudioFileWriter alloc]
initWithAudioFileURL:outputFileURL
samplingRate:self.audioManager.samplingRate
numChannels:self.audioManager.numInputChannels];
__block int counter = 0;
self.audioManager.inputBlock = ^(float *data, UInt32 numFrames, UInt32 numChannels) {
[wself.fileWriter writeNewAudio:data numFrames:numFrames numChannels:numChannels];
counter += 1;
if (counter > 800) { // roughly 5 seconds of audio
wself.audioManager.inputBlock = nil;
}
};
코드를 변경하지 않고 주석 만 제거했습니다.
가능한 해결책이나 제안 사항을 알고 있다면 나와 공유 할 수 있는지 궁금합니다.
탔을 https://github.com/alexbw/novocaine
굉장한! 감사) –