I\'m trying to convert a PCM 32-bit float audio stream to ALAC. I found some working examples to build from, but my own code keeps getting a -50 (paramErr) from AudioConverterFi
I experienced the same problem (AudioConverterFillComplexBuffer returning -50)
-
but it appeared only after restarting the same converter with a second file after the first one played to the end.
The first file converted perfectly without problems.
With the help of Claude's answer (THANKS!) I found out that the converter actually changes the size of the AudioBufferList to 0 if the end of the file is reached.
After resetting the AudioBufferList's sizes to the original values everthing works now as expected.
I was stuck in the same situation (basically after using your code as a template). Solution seems to be in allocation of memory for the AudioBufferList. Implementing this answer did the trick for me (although my objective-C is not good enough to see the exact difference :))