python-samplerate icon indicating copy to clipboard operation
python-samplerate copied to clipboard

input_frames_used returned by src_process may be less than the number of input frames

Open hcab14 opened this issue 4 years ago • 5 comments

https://github.com/tuxu/python-samplerate/blob/ed73d7a39e61bfb34b03dade14ffab59aa27922a/samplerate/converters.py#L175-L176

Currently input_frames_used is ignored.

This problem prevents python-samplerate to work correctly if the resampling ratio does not divide the block size provided to Resampler.process.

PR https://github.com/tuxu/python-samplerate/pull/6 is an attempt to fix this issue.

@tuxu: what would be the timeline for making a new release?

hcab14 avatar Dec 07 '20 21:12 hcab14

Thanks for the PR, @hcab14! We can upload a new release to PyPI just after your changes are reviewed and merged into master.

tuxu avatar Dec 08 '20 18:12 tuxu

Thanks a lot for your response!

Somehow this problem was not caught by the tests, so it'd be good to have a test case for that. I can start thinking about that.

BTW: the documentation for python-samplerate is very good.

hcab14 avatar Dec 08 '20 18:12 hcab14

Thanks for the PR, @hcab14! We can upload a new release to PyPI just after your changes are reviewed and merged into master.

@tuxu: did you have a look at the changes?

The motivation for these changes comes from here where currently only a few resampling ratios are supported due to this issue.

hcab14 avatar Dec 18 '20 05:12 hcab14

ping

hcab14 avatar Apr 29 '21 17:04 hcab14

Sorry, I was busy with a lot of other things. Hope to get back to you very soon.

tuxu avatar Apr 30 '21 17:04 tuxu