iPhone Core Audio Getting Started- Correction

At some point since I wrote the iPhone Core Audio Getting Started post, a small bug in my AudioStreamBasicDescription on the multi-Channel Mixer input went from not mattering to making the output a garbled mess. Those stream descriptions are tricky devils!

To fix it, you need  to change the line.

desc.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kLinearPCMFormatFlagIsNonInterleaved;

to

desc.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;

or

desc.mFormatFlags = kAudioFormatFlagsCanonical;

Ahh, pure, clean sine wave.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s