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.

Attachment: speex_resampler_missing_outputsamples.c.xz
Description: Binary data

Attachment: resample_save_in_len_for_multiple_channels.patch
Description: Binary data

Reply via email to