Unable to convert mp3 into PCM using AudioConverterFillComplexBuffer in AudioFileStreamOpen's AudioFileStream_PacketsProc callback

Hej @3254523, I have some answers with possible solutions for you. I hope to guide you in the right way in spite of I am not expert in this major. So, the problem is for sure the configuration of:

AudioBufferList

Here the links that probes the hints of this -50 OSStatus related to the AudioBufferList: http://lists.apple.com/archives/coreaudio-api/2012/Apr/msg00041.html https://forums.developer.apple.com/thread/6313

Now, we have to focus in a solutions. Looking through your AudioBufferList, you have no assigned any value but mNumberBuffers which is 1. Try to change the values in the following way(as it shown in the second link):

var localPcmBufferList = AudioBufferList(mNumberBuffers: 2, mBuffers: AudioBuffer(mNumberChannels: 2, mDataByteSize: UInt32(buffer.count), mData: &buffer))

If still is not working, we have to focus to correct it properly, hence here you can find the solution to the -50 OSStatus in AudioConverterFillComplexBuffer although not in swift:

AudioConverterFillComplexBuffer return -50 (paramErr)

iPhone: AudioBufferList init and release