In general, the task of sample rate conversion requires interpolating the
original data stream (adding zero-value samples), filtering and then
decimating the result. For your example (22 kHz -> 32 kHz), you would have
to upsample (interpolate) by a factor of 16 and then downsample (decimate)
by a factor of 11. Doing this successfully requires some knowledge of DSP
I don't know offhand of a source for a function that would fit your
particular case. Much would depend on your specific requirements. If you
are interested in pursuing this further, I did a Google search on "sample
rate conversion" and got 123,000 hits, so you might want to look there.
> Hi, I'm looking for help creating a function to convert audio samples
> from one sample rate to another (22khz to 32khz for example). I've
> tried the functions built into Visual C++ 6, but it doesn't seem to
> convert the sample (my wave form looks like little stair-steps instead of
> the pure sine wave I sent through it).
> Does anyone know of some good sample code I could use to do this?
> been searching around the web, but with no luck.
> Thanks in advance!