These are the values I pass in, it's the only combination of values I have got working.
dataFormat.mSampleRate = 44100;
dataFormat.mFormatID = kAudioFormatLinearPCM;
dataFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsBigEndian;
dataFormat.mBytesPerPacket = 4;
dataFormat.mFramesPerPacket = 1;
dataFormat.mBytesPerFrame = 4;
dataFormat.mChannelsPerFrame = 2;
dataFormat.mBitsPerChannel = 16;
status = AudioQueueNewInput( &dataFormat, AudioInputCallback, self, NULL, NULL, 0,
&queue);
status = AudioFileCreateWithURL(fileUrl, kAudioFileCAFType, &dataformat, kAudioFileFlags_EraseFile, &audioFile
The recording works, but it is a lot of noise during the recording, and on the playback. Can it have anything to do with this code?