Gentoo's current ebuild uses passes "--disable-samplerate" to VLC's configure script by default, which seems to cause very crappy audio quality under certain circumstances. (Specifically, playback to ALSA using the FLOAT_LE format. See https://trac.videolan.org/vlc/ticket/11568 for more details) Setting the "libsamplerate" USE flag fixes this, but it certainly isn't immediately obvious that this rather innocuous flag can cause issues like this. That flag is apparently not documented anywhere either: I only found it by examining the ebuild file itself.
Confirmed still present in 2.2.1. I verified with a sample of HD audio from http://www.2l.no/hires/index.html. Playing with -v I see the bad resampler appear [00007f227c034ae8] core audio resampler debug: using audio resampler module "ugly_resampler" Setting libsamplerate as Calvin suggests does fix the issue. Discussing final solution with Ian.
Created attachment 401510 [details, diff] libsamplerate_iuse.patch After discussion, it was agreed that defaulting to libsamplerate is a good approach as it's fairly lightweight and can still be disabled. Patch to switch to +libsamplerate for vlc-2.2.0. Patch for 2.2.1 will be added to version bump bug.
Thanks Nick! :)
18 Apr 2015; Ian Delaney <idella4@gentoo.org> vlc-2.1.9999.ebuild, vlc-2.2.0.ebuild, vlc-2.2.9999.ebuild, vlc-9999.ebuild: set IUSE libsamplerate to +, fixes bug #522182, issue discussed with new (proxy) maintainer
Calvin, thanks for reporting it, sorry it's taken so long to resolve. I've recently volunteered to proxy maintain VLC and am trying to clean up where capable. I'll be posting an overlay soon that may be of interest, but anyways, good catch with this!