Thursday Night

Paul Betts’s personal website / blog / what-have-you

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:

padsp winecfg

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 ;) )

padsp wine ~/.wine/drive_c/Program\ Files/Starcraft/starcraft.exe

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.

Written by Paul Betts

May 27th, 2007 at 7:42 pm

Posted in Linux,Microsoft