camilladsp
camilladsp copied to clipboard
file backend: synchronous resampler cuts samples at the end of stream
test file:
---
devices:
samplerate: 96000
chunksize: 1024
enable_resampling: true
resampler_type: Synchronous # or AccurateAsync
capture_samplerate: 44100
playback:
type: File
channels: 1
filename: "result.raw"
format: S16LE
capture:
type: File
channels: 1
filename: "test.wav"
format: S16LE
extra_samples: 1000

Here's the wave form of 1) original audio 2) audio generated by the above script but with AccurateAsync resampler 3) audio generated by the above script (using FFT).
the sinc interpolation works well. the fft cuts off the last few samples.
Thanks for reporting! Currently the extra samples are not run through the resampler, this would be needed to ensure that all samples are flushed from it.
This should be fixed by https://github.com/HEnquist/camilladsp/commit/db8b696665284b61ab73251a878227cd8548e4e8