JSSRC
JSSRC copied to clipboard
Crackling noise when resampling from 22050Hz to 48000Hz
The issue also appears when resampling from 44100 to 48000Hz, but less often. It can be best observed when resampling a constant signal. Lets say a file with shorts of value 16384. Then, every several thousand samples a 0 will be present in the output. (and ripples around it). If the value of FFTFIRLEN is decreased to 65536/8, then the 0s are more often in the output signal.
The code used for test is:
File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC);//new File(RawRecordFilePath); File reSampled = new File(path, "resampled_22050_16384val_ssrconly_00.raw"); File beforeResampleFile = new File(path,"22050_16384val.raw"); try { FileInputStream is = new FileInputStream(beforeResampleFile); FileOutputStream os = new FileOutputStream(reSampled); new SSRC(is, os, 22050, 48000, 2,//short 2,//short 1, Integer.MAX_VALUE, 0, 0, true); }catch...