I am getting strange behaviour with AudioFileReadPackets since it's been deprecated in iOS 8. How should it be replaced?
From the Apple's Documentation:
AudioFileReadPackets is deprecated in iOS 8.0 . You can try this: AudioFileReadPacketData
If you do not need to read a fixed duration of audio data, but rather want to use your memory buffer most efficiently, use
AudioFileReadPacketData
instead ofAudioFileReadPackets
.When reading variable bit-rate (VBR) audio data, usingAudioFileReadPackets
function requires that you allocate more memory than you would for the AudioFileReadPacketData function. See the descriptions for the outBuffer parameter in each of these two functions. In addition,AudioFileReadPackets
function is less efficient thanAudioFileReadPacketData
when reading compressed file formats that do not have packet tables, such as MP3 or ADTS. Use this function only when you need to read a fixed duration of audio data, or when you are reading only uncompressed audio.Audio File Services reads one 32-bit chunk of a file at a time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With