こんにちは、以下のコードから wav オーディオ ファイルを作成しようとしていますが、Creating file ('fmt?') というエラーが表示され続けます。誰でもここで私を助けることができますか? ありがとう。
私のログ: *2012-11-01 13:33:14.183 Novocaine iOS Example[7456:c07] URL: file://localhost/Users/pier/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/01EBF2C0- 2C3A-490D-835E-9C39A3E88E0B/ドキュメント/testrecording.wav
エラー: ファイルの作成 ('fmt?')*
- (id)initWithAudioFileURL:(NSURL *)urlToAudioFile samplingRate:(float)thisSamplingRate numChannels:(UInt32)thisNumChannels
{
self = [super init];
if (self)
{
// Zero-out our timer, so we know we're not using our callback yet
self.callbackTimer = nil;
// Open a reference to the audio file
self.audioFileURL = urlToAudioFile;
CFURLRef audioFileRef = (CFURLRef)self.audioFileURL;
AudioStreamBasicDescription outputFileDesc;
// Set a few defaults and presets
self.samplingRate = thisSamplingRate;
self.numChannels = thisNumChannels;
self.currentTime = 0.0;
self.latency = .011609977; // 512 samples / ( 44100 samples / sec ) default
outputFileDesc.mSampleRate = self.samplingRate;
outputFileDesc.mFormatID = kAudioFormatLinearPCM;
outputFileDesc.mFormatFlags = kAudioFormatFlagIsFloat;
outputFileDesc.mBytesPerPacket = 4*self.numChannels;
outputFileDesc.mFramesPerPacket = 1;
outputFileDesc.mBytesPerFrame = 4*self.numChannels;
outputFileDesc.mChannelsPerFrame = self.numChannels;
outputFileDesc.mBitsPerChannel = 32;
CheckError(ExtAudioFileCreateWithURL(audioFileRef, kAudioFileWAVEType, &outputFileDesc, NULL, kAudioFileFlags_EraseFile, &_outputFile), "Creating file");
. . .