Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have an app that throws samples in a render callback using AudioUnitSampleType. It's deprecated on iOS 8, and the sound is not working now. Previous iOS versions worked perfect. I can't find any documentation on how to replace AudioUnitSampleType.

The only info i got is the xcode warning ... "The concept of canonical formats is deprecated"

Please, help, can anyone put some light on how to fix it ?

like image 474
Fischer Avatar asked Sep 23 '14 22:09

Fischer


1 Answers

I've the same issue. You can replace AudioUnitSampleType with SInt32. I guess you have declared AudioStreamBasicDescription too, so replace your declaration from streamFormat.mFormatFlags = kAudioFormatFlagsAudioUnitCanonical; to streamFormat.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved;

Hope it will help.

EDIT:

You can also use typealias to define AudioUnitSampleType

EDIT: You also may consider switching to TheAmazingAudioEngine

like image 113
DeVladinci Avatar answered Nov 14 '22 14:11

DeVladinci