Bug#689049: Resampler stops in the middle of run with multiple channels
Franz Schrober
franzschrober at yahoo.de
Fri Sep 28 17:30:40 UTC 2012
Package: libspeexdsp1
Version: 1.2~rc1-6
Severity: normal
Tags: patch
Hi,
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
completely different:
"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` \
-o speex_resampler_missing_outputsamples
A patch to fix this problem is attached.
--- System information. ---
Architecture: amd64
Kernel: Linux 3.2.0-3-amd64
Debian Release: wheezy/sid
500 unstable www.deb-multimedia.org
500 unstable http.debian.net
500 testing http.debian.net
1 experimental www.deb-multimedia.org
1 experimental http.debian.net
--- Package information. ---
Depends (Version) | Installed
======================-+-===========
libc6 (>= 2.3.4) |
Package's Recommends field is empty.
Package's Suggests field is empty.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: speex_resampler_missing_outputsamples.c.xz
Type: application/octet-stream
Size: 5316 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-voip-maintainers/attachments/20120928/c532d411/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resample_save_in_len_for_multiple_channels.patch
Type: application/octet-stream
Size: 1423 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-voip-maintainers/attachments/20120928/c532d411/attachment-0001.obj>
More information about the Pkg-voip-maintainers
mailing list