I have been programming a tiny application on MacOSX for the past few weeks, reading from an AAC audio file stored in BinaryData.cpp and using a few customized filters (namely IIRFilter and Reverb) to do some effects.
The audio sounds fine on MacOSX now. However when I tried to run my app on iOS (either on a device or in the simulator), the audio sounds saturated.
At first I thought it might be due to CPU usage but when I ran the app for profiling it wasn’t using more than 10% CPU at any time.
On the other hand, if I apply a gain of 2 on the files I’m reading, the noise gets much worse, even with all filters disabled. So this strongly advocates for a saturation problem.
Did I miss something obvious? I thought maybe my floating-point buffers are converted into 16-bits integers or something?