I\'m looking to perform an FFT on a linear PCM audio file (with potentially more than one audio channel) on OS X. What is the best way to go about this?
Several sou
It seems to me that you should be looking into Core Audio... I'm not very familiar with it, but it looks like it should get the channel deinterleaving for you already, and it works directly with PCM data. Because of my low familiarity, take this with a grain of salt, but I'd try putting the FFT in an Audio Unit, taking a single channel of PCM data as input, storing the results of the FFT somewhere accessible, and passing the input through to the output.
As far as actually performing the FFT, the main challenge seems, to me, to be in coercing the PCM input to the double * vector that the FFT routine wants to operate against. Looking through vDSP.h (part of the accelerate framework), I see functions like vDSP_vflt16D (to convert a vector of 16-bit integers to a vector of double-precision real numbers), which looks like it'd solve your problem.
Core Audio Introduction