Currently, playing a video in VLC with pulseaudio installed and alsa set to use pulseaudio by default makes audio lag significantly. These upstream patches enables audio output directly to pulseaudio and solves the problem. See https://bugs.launchpad.net/debian/+source/vlc/+bug/196417 for the Ubuntu equivalent. The patches were accepted by them and are now in the latest beta of Ubuntu 8.04. Reproducible: Always Steps to Reproduce: 1. Install Pulseaudio 2. Set alsa to use PA by default (see http://www.pulseaudio.org/wiki/PerfectSetup#ALSAApplications) 3. Set VLC to use ALSA output 4. Open a video and scroll through it Actual Results: Sound lags Expected Results: Sounds shouldn't lag
Created attachment 147630 [details, diff] pulse audio output module patch from upstream
Created attachment 147631 [details, diff] this patch fixes the previous patch, also from upstream This patch needs to be applied after the previous one. They can be pretty easily combined if someone is inclined to do so.
For some reason, building this with the patches requires dev-util/cvs to be installed. Therefore the ebuild should be patched to depend on that, as well as adding a media-sound/pulseaudio dependency, possibly only if the pulseaudio USE flag is set.
Upstream has choosen not to backport pulseaudio module to bugfix branch (since its a new feature) We already have the pulseaudio useflag in 0.9.0 snapshots and I dont think it would be a good idea to add a new feature on our own for the bugfix branch. If sounds lag when alsa uses pulseaudio, my bet would be this is a pulseaudio or alsa@pulseaudio bug
Pulseaudio people refer to this patch for a fix: http://pulseaudio.org/ticket/226 If VLC 0.9.0 were coming out soon and was stable enough for people to use right now, I wouldn't be bothered about this, but the last snapshot I tried couldn't play a single file on my system.
(In reply to comment #5) > If VLC 0.9.0 were coming out soon and was stable enough for people to use right > now, I wouldn't be bothered about this, This is the main reason why there are releases and developpement branches upstream... one for bugfixes, one for new features. And I'm afraid pulseaudio output falls in the latter. > but the last snapshot I tried couldn't > play a single file on my system. Please report bugs about such things. Closing as upstream, if you want pulseaudio output in bugfix branch please poke them. If there is evidence that there is a bug in vlc *alsa* output then I'd be very happy to apply a patch for that; and if you want that to be investigated by pulseaudio people in case its a bug there, then it could be a good idea to tell them that there is no vlc release that supports native pulseaudio output.
Sorry for commenting in a closed, but pulseaudio is getting the default to manage sound under Linux and VLC is one of the most powerful media applications out there. But until we get a 0.9 stable branch, could not be possible to use this patch? I mean, I've made an ebuild for myself with three minor changes, and now everything works correctly. I'm sure other users would appreciate this.