• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AudioUnitRender fails with error -50 when recording as wav
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: If I have contracting work for a Core Audio Guru, can I post it here?
  • Next by Date: AUMatrixMixer questions
  • Previous by thread: Is there a way to tell I whether a vDSP call results in an "output buffer" being empty/non-empty ?
  • Next by thread: AUMatrixMixer questions
  • Index(es):
    • Date
    • Thread