Comment 543 for bug 371897

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

(In reply to Deve from comment #423)
> @Stefan
> Crackling sounds occurs in every game which I played under Wine. Of course
> not always. For example: Sims 3, Luxor 1, 2, 3, 4, Croc 2, Fifa 12,
> Bejeweled 2. I noticed that actually sounds are still playing, but much
> faster than they should.
>
> lspci says:
> 00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family
> High Definition Audio Controller (rev 04)
>
> Current packages versions:
> pulseaudio 4.0
> libasound2 1.0.28
>
> Pulseaudio works for me with PULSE_LATENCY_MSEC=60 environment variable (I
> hope it's not a case). But never worked properly with default settings.

Have you tried the patch I uploaded here back in May?

https://bugs.winehq.org/attachment.cgi?id=48661

I believe it vastly improves audio for PulseAudio users that are not using USB devices. I'd be interested to know if it helps you.

I'm becoming convinced that the PA-ALSA plugin can't provide reliable playback when USB devices are used. There was a discussion about this back in October:

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-October/022043.html

The ALSA API just doesn't provide a way to update client applications that the buffer metrics have changed after the device was created. This occurs for USB devices with PulseAudio. USB devices used to work in PA, but their latency configuration was updated around PA 4 or 5, which caused bugs for applications that can't handle high latencies, like many Windows applications running in Wine:

https://bugs.freedesktop.org/show_bug.cgi?id=66962

I plan to send the above patch to improve winealsa. I had been hoping to include a fix for USB-over-PA devices in the patch, which is why I haven't sent it yet. As I showed above, I'm not convinced it's possible to support this. The limiting factor is my time, I'm afraid. I need to test the patch, over lots of test cases (a dozen applications on each of non-USB, USB, PA non-USB, PA USB) and come to a decision on USB-over-Pulse.