Make Wine and PulseAudio get along
I got a Joost invite the other day, and I tried to get the client program working with Wine, the Linux implementation of the Win32 API. Sadly, it was a no-go; I couldn’t get it to work without skipping. However, it’s not all lost: here’s what I learned, the “best” way to get sounds working in Wine, at least until a native PulseAudio driver gets written.
First, we need to set up Wine correctly. Run this command to set up Wine:
The padsp part is important, it makes a virtual OSS device that will talk to the PulseAudio daemon. Next, go to the Audio tab and make sure the settings look like this:
Update: It seems I’ve lost this picture, go to the Audio tab and set the OSS device.
While my initial leaning was to use the ALSA or ESound driver as they would both theoretically work better, ALSA wouldn’t work at all and ESound had issues with skipping (either it’s naively coded or difficult to do in Wine, not sure; I’d guess the latter). So we can use the OSS driver, yet have full mixing and no weirdness due to using the virtual device. Next, to run the program (in this example, we’ll use Starcraft
)
You should have sound playing without any problems – I don’t know if this method would stand up to a lot of stress though, it uses emulated DirectSound but I had no problem with SC.
Ah joost. I wanted to try it but none of my friends has account there!
Sorry, but can you give me an invitation so that i can try it? please..
Many thanks!
Galuh
28 May 07 at 5:09 am
I think the picture for winecfg is missing.
Thanks for this post.
Irq5213
15 Apr 08 at 4:55 am
Adding yourself to the pulse-rt and pulse-access groups might help with the sound skipping. Or running the game with nice.
hellork
25 Apr 08 at 4:07 am
@irq5123: Appears to be lost – sorry about that!
Paul Betts
27 Apr 08 at 12:14 am
following these directions, I could not get Dragon NaturallySpeaking to run. I think I need to know what the winecfg settings were. Was it just that oss was checked, or was there more?
susan cragin
18 May 08 at 12:06 pm
@susan: I believe that’s it, though you could also try the ALSA or esound driver, though getting NaturallySpeaking to run probably won’t be useful as it’s pretty integrated into the Windows environment (i.e. you couldn’t start GEdit from NaturallySpeaking for example).
Paul Betts
18 May 08 at 1:41 pm
Thanks!
Mullwar
29 Jun 08 at 4:24 am
I successfully used pulseaudio through alsa with wine:
$ cat /etc/asound.conf
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
#pulse as default:
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
You need pulseaudio alsa plugin (in alsa-plugins package on gentoo)
In winecfg set alsa as device and set 8 bit sound. Done =)
(OSS works with your method but I always gets a too high volume as Ive maxxed my card volumes to let pulseaudio control the volume (its weird it doesnt respect pulseaudios config though as it is padsp..))
Thomas A
17 Jul 08 at 5:21 am
@Thomas A: I used to use this method too, but the problem is everything is completely hosed if PA crashes – since PA hooks the ALSA libraries already, you don’t need to do this.
I’d actually set the native card volumes to ~80%, because at maximum the audio will start to clip (it’ll sound like crackling)
Paul Betts
17 Jul 08 at 11:19 am
“… at least until a native PulseAudio driver gets written.” Done.
Arthur Taylor
6 Dec 08 at 9:23 am
(actual content)
http://art.ified.ca/?page_id=40
see also: http://bugs.winehq.org/show_bug.cgi?id=10495
Arthur Taylor
6 Dec 08 at 9:26 am
[...] managed to hack spotify to work with pulse audio and wine so thanks to the admin at that link for their post! Thats amazing, all my music is on their so [...]
Ubuntu Set up! | Jake McHugh
28 Jun 09 at 12:17 pm
thanx!!
NiV
3 Dec 09 at 7:48 am
Thanks for this tip. Solved my laggy audio with Wine/Spotify in Ubuntu. Merry x-mas.
Nils
18 Dec 09 at 4:19 am
Thank you very uch! Now I can finally use spotify under linux
Simon
22 Dec 09 at 9:43 am
It looks like it fixed my problem when running WoW under wine
Andrea Grandi
12 Jan 10 at 9:09 am
[...] Luckily the massive wisdom of teh intarwebs came to the rescue again, this time through an almost three year old post by Paul Betts: “Make Wine and PulseAudio Get Along“. [...]
Making Spotify, Wine and PulseAudio Play Together | Mats Lindh
16 Jan 10 at 5:05 am
Worked! cheers!
dominic
20 Jan 10 at 9:15 am
Thanks, that resolved my sound problems (Ubuntu 9.10 x64, Wine 1.0.1)!
Thomas
27 Feb 10 at 12:56 pm