Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 436528 - media-libs/speex: Resampler stops in the middle of run with multiple channels
Summary: media-libs/speex: Resampler stops in the middle of run with multiple channels
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-09-28 17:33 UTC by Franz Schrober
Modified: 2012-09-29 15:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
speex_resampler_missing_outputsamples.c.xz (speex_resampler_missing_outputsamples.c.xz,5.19 KB, application/x-xz)
2012-09-28 17:33 UTC, Franz Schrober
Details
resample_save_in_len_for_multiple_channels.patch (resample_save_in_len_for_multiple_channels.patch,1.39 KB, patch)
2012-09-28 17:34 UTC, Franz Schrober
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Schrober 2012-09-28 17:33:02 UTC
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.

Reproducible: Always
Comment 1 Franz Schrober 2012-09-28 17:33:36 UTC
Created attachment 325236 [details]
speex_resampler_missing_outputsamples.c.xz
Comment 2 Franz Schrober 2012-09-28 17:34:09 UTC
Created attachment 325238 [details, diff]
resample_save_in_len_for_multiple_channels.patch