Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 522182

Summary: media-video/vlc should set IUSE=+libsamplerate
Product: Gentoo Linux Reporter: Calvin Owens <calvin>
Component: Current packagesAssignee: Nick Andrade <SDNick484>
Status: RESOLVED FIXED    
Severity: normal CC: dlan, media-video
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://trac.videolan.org/vlc/ticket/11568
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 546880    
Attachments: libsamplerate_iuse.patch

Description Calvin Owens 2014-09-05 07:15:50 UTC
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.
Comment 1 Nick Andrade 2015-04-18 04:38:44 UTC
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.
Comment 2 Nick Andrade 2015-04-18 05:40:47 UTC
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.
Comment 3 Calvin Owens 2015-04-18 06:02:28 UTC
Thanks Nick! :)
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2015-04-18 06:13:35 UTC
  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
Comment 5 Nick Andrade 2015-04-18 06:15:40 UTC
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!