AudioFileReadPackets deprecated in iOS8

I get weird behavior with AudioFileReadPackets as it is deprecated in iOS 8. How to replace it?

+4
source share
1 answer

From Apple 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, want to use your memory buffer most efficiently, use AudioFileReadPacketDatainstead AudioFileReadPackets. When reading a variable bitrate (VBR) using a function AudioFileReadPackets, you need to allocate more memory than the AudioFileReadPacketData function. See the outBuffer parameter descriptions in each of these two functions. In addition, the function is AudioFileReadPacketsless effective than AudioFileReadPacketDatawhen 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.
+8
source

All Articles