[vlc-devel] [PATCH] Speex_Resampler: reject samplerates above 96kHz

Rémi Denis-Courmont remi at remlab.net
Fri Apr 6 07:34:25 CEST 2012


   Hello,

On Friday 06 April 2012, Jean-Baptiste Kempf wrote:
> works in 88.2kHz
> Should close #5781

On integer pipelines, this will cause fallback to ugly... Right now it is not 
much of an issue. But someone might want to optimize the audio output to, say, 
use S16N when both decoder and output use S16N....

> ---
>  modules/audio_filter/resampler/speex.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/modules/audio_filter/resampler/speex.c
> b/modules/audio_filter/resampler/speex.c index 561261a..77e77bd 100644
> --- a/modules/audio_filter/resampler/speex.c
> +++ b/modules/audio_filter/resampler/speex.c
> @@ -62,7 +62,8 @@ static int Open (vlc_object_t *obj)
> 
>       || filter->fmt_in.audio.i_physical_channels
> 
>                                    !=
> filter->fmt_out.audio.i_physical_channels
> 
>       || filter->fmt_in.audio.i_original_channels
> 
> -                                  !=
> filter->fmt_out.audio.i_original_channels) +                              
>    != filter->fmt_out.audio.i_original_channels +     ||
> filter->fmt_in.audio.i_rate >= 96000)

This is dubious. I would rather limitations depending on the resampling ratio 
than the absolute output rate. But the problem might be as simple as fixing 
buffer underflows.

-- 
Rémi Denis-Courmont
http://www.remlab.info



More information about the vlc-devel mailing list