kstenerud / ObjectAL-for-iPhone

Mac and iOS Audio development, minus the headache. ObjectAL is the easy Objective-C interface to OpenAL, AVAudioPlayer, and audio session management.
http://kstenerud.github.com/ObjectAL-for-iPhone
885 stars 171 forks source link

CAStreamBasicDescription Deprecated Warnings #82

Open RhysLindmark opened 9 years ago

RhysLindmark commented 9 years ago

In ObjectAL 2.5, I get the 4 deprecation warnings in CAStreamBasicDescription in this method:

void    CAStreamBasicDescription::NormalizeLinearPCMFormat(AudioStreamBasicDescription& ioDescription)
{
    //  the only thing that changes is to make mixable linear PCM into the canonical linear PCM format
    if((ioDescription.mFormatID == kAudioFormatLinearPCM) && ((ioDescription.mFormatFlags & kIsNonMixableFlag) == 0))
    {
        //  the canonical linear PCM format
        ioDescription.mFormatFlags = kAudioFormatFlagsCanonical;
        ioDescription.mBytesPerPacket = SizeOf32(AudioSampleType) * ioDescription.mChannelsPerFrame;
        ioDescription.mFramesPerPacket = 1;
        ioDescription.mBytesPerFrame = SizeOf32(AudioSampleType) * ioDescription.mChannelsPerFrame;
        ioDescription.mBitsPerChannel = 8 * SizeOf32(AudioSampleType);
    }
}

Each of the warnings says: X is deprecated: the concept of canonical formats is deprecated

I also get 6 warnings in the .h file (all of which are the same warning type).

It seems like this SO post has the answer? http://stackoverflow.com/questions/26005674/audiounitsampletype-deprecated-on-ios8-my-render-callback-is-not-working-now