Skip to content

Instantly share code, notes, and snippets.

@tkemp
Created December 11, 2012 20:53
Show Gist options
  • Save tkemp/4262031 to your computer and use it in GitHub Desktop.
Save tkemp/4262031 to your computer and use it in GitHub Desktop.
ASBD for iOS native/canonical
AudioStreamBasicDescription _outputASBD;
memset(&_outputASBD, 0, sizeof(_outputASBD));
_outputASBD.mSampleRate = 44100.0;
_outputASBD.mFormatID = kAudioFormatLinearPCM;
_outputASBD.mFormatFlags = kAudioFormatFlagsCanonical; // Equivalent to kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked
_outputASBD.mBytesPerPacket = 2 * 2;
_outputASBD.mBytesPerFrame = 2 * 2;
_outputASBD.mFramesPerPacket = 1;
_outputASBD.mChannelsPerFrame = 2;
_outputASBD.mBitsPerChannel = 16;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment