[Speex-dev] Scaling fix for float input
Arslan, Fahad
Fahad_Arslan at mentor.com
Tue Dec 24 05:04:34 PST 2013
So this means this should be fixed in Pulseaudio then, right?
Thanks,
Fahad
________________________________________
From: Jean-Marc Valin [jmvalin at jmvalin.ca]
Sent: Saturday, December 21, 2013 8:04 AM
To: Arslan, Fahad; speex-dev at xiph.org
Subject: Re: [Speex-dev] Scaling fix for float input
On 20/12/13 08:06 AM, Arslan, Fahad wrote:
> Need to adjust scale for floating input.
> diff -NaurbB a/libspeex/resample.c b/libspeex/resample.c
> --- a/libspeex/resample.c 2013-12-20 17:40:27.326576921 +0500
> +++ b/libspeex/resample.c 2013-12-20 17:40:16.918577087 +0500
> @@ -915,7 +915,7 @@
> if (in) {
> for(j=0;j<ichunk;++j)
> #ifdef FIXED_POINT
> - x[j+st->filt_len-1]=WORD2INT(in[j*istride_save]);
> + x[j+st->filt_len-1]=WORD2INT(32768.*in[j*istride_save]);
> #else
> x[j+st->filt_len-1]=in[j*istride_save];
> #endif
You realize that applying this patch would break every application
currently using this code? Not using a range of +/-1 in the float API
was a mistake, but breaking the API would be worse.
Jean-Marc
More information about the Speex-dev
mailing list