Converting the sample rate of audio files

Purpose. Converts audio files, changing the sample rate of the audio data.

Usage. 

java SampleRateConverter -h

java SampleRateConverter targetsamplerate sourcefile targetfile

Parameters. 

-h

prints usage information

targetsamplerate

the sample rate that should be converted to

sourcefile

the file name of the audio file that should be read to get the audio data to convert

targetfile

the file name of the audio file that the converted audio data should be written to

Bugs, limitations. Sample rate conversion can only be handled natively by Tritonus. If you want to do sample rate conversion with the Sun jdk1.3/1.4, you have to install Tritonus' sample rate converter. It is part of the 'Tritonus miscellaneous' plug-in. See Tritonus Plug-ins.

Source code.  SampleRateConverter.java, AudioCommon.java