Convert Wave Sample Rate
Posted on 2007-12-03
I am sampling audio from a number of sources mainly at 44100 16bit stereo but some sources are 48000 16bit stereo and I need to convert these sources to 44100.
I have the actual raw audio data available to me in memory so what I am looking for is some code (a function or procedure) which I can pass the audio data pointer and a target sample rate and have it returned in the correct format on-the-fly.
I can do this through the ACM but its not ideal and relies on opening, closing and managing the ACM. I would much prefere it in code.
I have searched the internet on some way to do this or even an explanation of how it could be done but I can't find anything. It's either really easy to do and I am overthinking it or it's just not very well documented.
Any help is appreciated.