memset(&_outputASBD, 0, sizeof(_outputASBD));
_outputASBD.mSampleRate = 44100.0;
_outputASBD.mFormatID = kAudioFormatLinearPCM;
_outputASBD.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsBigEndian | kAudioFormatFlagIsPacked;
_outputASBD.mBytesPerPacket = 2 * 2;
_outputASBD.mBytesPerFrame = 2 * 2;
_outputASBD.mFramesPerPacket = 1;
_outputASBD.mChannelsPerFrame = 2;
_outputASBD.mBitsPerChannel = 16;
// Set recording format (ExtAudioFileWriteAsync)
memset(&_fileASBD, 0, sizeof(_fileASBD));
_fileASBD.mSampleRate = 44100.00;
_fileASBD.mFormatID = kAudioFormatLinearPCM;
_fileASBD.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsBigEndian | kAudioFormatFlagIsPacked;;
_fileASBD.mBytesPerPacket = 2 * 2;
_fileASBD.mBytesPerFrame = 2 * 2;
_fileASBD.mFramesPerPacket = 1;
_fileASBD.mChannelsPerFrame = 2;
_fileASBD.mBitsPerChannel = 16;
I just tried now changing both ASBDs to 32 bits per channel, 8 bytes per packet and frame. I left everything else. Audio from the speakers was fine as usual, but this time both recorded channels were pure noise.
On 6 Dec 2012, at 07:58, Joel Reymont wrote:
Your ASBD has to match the audio you are receiving from the AU.
If you are receiving 32-bit audio then your ASBD bits per channel
should be 32, no?
On Thu, Dec 6, 2012 at 12:41 PM, Tim Kemp <
email@hidden> wrote:
_fileASBD.mBitsPerChannel = 16;
--------------------------------------------------------------------------
for hire: mac osx device driver ninja. kernel, usb and coreaudio drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs |
http://www.linkedin.com/in/joelreymont---------------------+------------+---------------------------------------