[pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Alexander E. Patrakov
When Speex is compiled with FIXED_POINT defined, it scales float input to ±32768 instead of ±1. In order to make floating point resampler work with speex compiled with FIXED_POINT, we need to rescale the input to speex. This rescaling does not hurt normal speex, so we do it unconditionally. Signed

Re: [pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Peter Meerwald
> When Speex is compiled with FIXED_POINT defined, it scales float input > to ±32768 instead of ±1. In order to make floating point resampler > work with speex compiled with FIXED_POINT, we need to rescale the input > to speex. This rescaling does not hurt normal speex, so we do it > unconditional

Re: [pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Alexander E. Patrakov
10.05.2014 22:45, Peter Meerwald wrote: When Speex is compiled with FIXED_POINT defined, it scales float input to ±32768 instead of ±1. In order to make floating point resampler work with speex compiled with FIXED_POINT, we need to rescale the input to speex. This rescaling does not hurt normal

Re: [pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Peter Meerwald
Hi, > > > When Speex is compiled with FIXED_POINT defined, it scales float input > > > to ±32768 instead of ±1. In order to make floating point resampler > > > work with speex compiled with FIXED_POINT, we need to rescale the input > > > to speex. This rescaling does not hurt normal speex, so we d

Re: [pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Alexander E. Patrakov
10.05.2014 23:12, Peter Meerwald wrote: Hi, When Speex is compiled with FIXED_POINT defined, it scales float input to ±32768 instead of ±1. In order to make floating point resampler work with speex compiled with FIXED_POINT, we need to rescale the input to speex. This rescaling does not hurt no

Re: [pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Laurențiu Nicola
Sorry for barging in on this, but is there a way to run a benchmark on all the resamplers included in PulseAudio? For me, both speex-float-6 and speex-fixed-6 eat around 40% CPU. Laurentiu Nicola On Sat, May 10, 2014, at 20:29, Alexander E. Patrakov wrote: > 10.05.2014 23:12, Peter Meerwald wrote

Re: [pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Alexander E. Patrakov
10.05.2014 23:37, Laurențiu Nicola wrote: Sorry for barging in on this, but is there a way to run a benchmark on all the resamplers included in PulseAudio? For me, both speex-float-6 and speex-fixed-6 eat around 40% CPU. Congratulations for being a perfect mind-reader. I was going to ask the s

Re: [pulseaudio-discuss] [PATCH v2] resampler: Support speex resampler compiled with FIXED_POINT

2014-05-10 Thread Laurențiu Nicola
To be fair, my testing conditions are not really idea, so I'm not sure how accurate my number is. For example, if I use speex-fixed-10, CPU usage doesn't seem too high, but I get underruns for a few seconds, then the CPU gets lower (to around 10%) and sound is fine for a while. I suppose this is s