AudioUnitRender fails with error -50 when recording as wav
AudioUnitRender fails with error -50 when recording as wav
- Subject: AudioUnitRender fails with error -50 when recording as wav
- From: Bernd Bächle <email@hidden>
- Date: Sat, 19 Apr 2008 14:49:26 +0200
I modified the DCAudioFileRecorder Sample to save as wav instead of m4a, but I always get: AudioUnitRender fails with error -50 which indicates that one of the parameters is wrong.
As this method is called in a callback-interface, the only parameters I control are the AudioBuffer and the AudioUnit, but I cannot see what is wrong.
My output-format is specified as follows: fOutputFormat.mSampleRate = fDeviceFormat.mSampleRate; fOutputFormat.mChannelsPerFrame = 2; fOutputFormat.mFormatID = kAudioFormatLinearPCM; fOutputFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked; fOutputFormat.mBitsPerChannel = 16; fOutputFormat.mFramesPerPacket = 1; fOutputFormat.mBytesPerFrame = 4; fOutputFormat.mBytesPerPacket = fOutputFormat.mBytesPerFrame;
The AudioBuffer for the callback is defined as follows: list->mNumberBuffers = numChannels; for(i = 0; i < numChannels; ++i) { list->mBuffers[i].mNumberChannels = 1; list->mBuffers[i].mDataByteSize = size; list->mBuffers[i].mData = malloc(size); if(list->mBuffers[i].mData == NULL) { DestroyAudioBufferList(list); return NULL; } }
Any idea?
Thanks for your help Bernd |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden