I have needed to do in Java an resampling from an sound (WAV or MP3) that have sample rate equal with 32KHz into a sound with 48KHz.
I have the array of sound samples, which will be filtered.
I have applied the bottom algorithm but I have obtained a sound with distortions (the resulted sound is played faster than the original sound.)
Algorithm: if we have a 32000hz rate in order to convert it to 48000hz we'll add between 2 sound samples a new sample equal to the first one. As input sound samples array will be X Y X Y X Y X Y and as output will be XXY XXY XXY XXY, so that the output array we'll have the size 1.5 of the input sound array.
Any suggestions, algorithms, sample code or URL links will be appreciated.