Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crackling noise when resampling from 22050Hz to 48000Hz #2

Open
bogru opened this issue May 10, 2016 · 1 comment
Open

Crackling noise when resampling from 22050Hz to 48000Hz #2

bogru opened this issue May 10, 2016 · 1 comment

Comments

@bogru
Copy link
Contributor

bogru commented May 10, 2016

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.

@bogru
Copy link
Contributor Author

bogru commented May 10, 2016

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant