On 24.2.2014 13:13, Maarten Baert wrote:
On 24/02/14 10:17, Takashi Iwai wrote:
Can S32 work instead of S16? Then we won't lose the accuracy so much. Of course, handling float directly would be the best option.
The samplerate and speexrate plugins currently take S16 (see pcm_src_convert_s16 in alsa-plugins/rate/rate_samplerate.c and alsa-plugins/rate/rate_speexrate.c), so just using S32 will not improve the accuracy. It would be easy to replace those functions with pcm_src_convert_float (both resampler libraries have functions that take float directly), but that will break the plugin ABI. Is that acceptable?
Here is my older patch for the convertor, I know it needs a bit of work before accepting (originally discussed at http://mailman.alsa-project.org/pipermail/alsa-devel/2011-June/041368.html )
If this project gets done, there is a CPU-efficient libsoxr convertor plugin in the pipeline too.
Thanks a lot,
Pavel.