You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Buffer with 48kHz audio as PCM signed 16-bit little-endian (FFmpeg format s16le). Then I'm doing this simple test to find out that the resample function is affecting the source data:
while(...){constaudioBuffer=Buffer.from(...);constresampled=WaveResampler.resample(audioBuffer,48000,16000,{LPF: true,});// `resampled` is not used. `audioBuffer` has been modified but it shouldn't.fs.appendFileSync("/tmp/test.raw",audioBuffer);}
Now playing this audio with FFmpeg, the audio contents have been destroyed and everything is just noise, except that the original audio can be kind of noticed very subtle in the background:
ffplay -f s16le -ar 48k -ac 1 /tmp/test.raw
Setting LPF: false avoids the issue. The mistake seems to be in the downsample_() function, which saves data directly into the source buffer, when I believe it shouldn't:
samples[i]=filter.filter(samples[i]);
As it is, no LPF downsampling can be done with this library with default settings, because the resulting audio is garbled.
The text was updated successfully, but these errors were encountered:
I have a Buffer with 48kHz audio as PCM signed 16-bit little-endian (FFmpeg format
s16le
). Then I'm doing this simple test to find out that the resample function is affecting the source data:Now playing this audio with FFmpeg, the audio contents have been destroyed and everything is just noise, except that the original audio can be kind of noticed very subtle in the background:
Setting
LPF: false
avoids the issue. The mistake seems to be in thedownsample_()
function, which saves data directly into the source buffer, when I believe it shouldn't:As it is, no LPF downsampling can be done with this library with default settings, because the resulting audio is garbled.
The text was updated successfully, but these errors were encountered: