AudioUnitSampleType deprecated on iOS8, my callback handler is not working now

I have an application that throws samples in a render callback using AudioUnitSampleType. It is deprecated on iOS 8 and the sound is not working right now. Previous versions of iOS worked just fine. I cannot find documentation on how to replace AudioUnitSampleType.

The only information I received was the xcode warning ... "The concept of canonical formats is out of date"

Please help, can someone tell me how to fix it?

+7
callback ios8 core-audio
source share
1 answer

I have the same problem. You can replace AudioUnitSampleType with SInt32 . I think you declared AudioStreamBasicDescription , so replace the declaration with streamFormat.mFormatFlags = kAudioFormatFlagsAudioUnitCanonical; on streamFormat.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved; streamFormat.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved;

Hope this helps.

EDIT:

You can also use typealias to define AudioUnitSampleType

EDIT: you can also go to TheAmazingAudioEngine

+11
source share

All Articles