I noticed a quite strange behavior of speex when I resample a large input
buffer (so underbuffering is not a problem). It stops during the call even
when neither the number of requested out_len nor the number of provided input
samples was reached.
http://www.speex.org/docs/manual/speex-manual/node7.html says something
"Unless an error occurs, either all input samples will be read or all output
samples will be written to (or both)."
I've attached a test program that should show the problem. The input buffer is
usually a lot larger, but I reduced it to keep the source file small. I get
following output form the test program:
"Resampling stopped during processing. 2 samples missing in output and 100
samples from input weren't used".
The example can be compiled using:
$ unxz speex_resampler_missing_outputsamples.c.xz
$ gcc speex_resampler_missing_outputsamples.c \
`pkg-config --cflags --libs speexdsp` \
A patch to fix this problem is attached.
Created attachment 325236 [details]
Created attachment 325238 [details, diff]