Wine foobar2000 5.1 Surround

Wine is a compatibility layer to allow you to run Windows programs on Linux with near native efficiency. I use Wine to run foobar2000 on Linux. On Windows, foobar2000 supports upmixing stereo tracks into 5.1 surround sound. This was the first thing I missed when I moved my Desktop to Linux full time.

After a good bit of googling, it turns out that it is actually possible to pass 5.1 surround sound from a Wine application to the native Linux sound driver. It requires two things:

PulseAudio a newer, more advanced sound driver for Linux, designed to replace the ageing ESD. WinePulse is a set of patches for Wine designed to allow it to interact with PulseAudio properly. In short, this allows Wine to provide the host applications with 6 channel audio output.

You can either patch and build WinePulse yourself, or you are a Debian/Ubuntu user, you can use the prepatched binaries available from here.

The one thing you might notice is that sometimes there is an annoying high frequency hiss tone introduced when you change volume, but not when volume is at 0.00 dB. This is a known bug, but has been fixed by David Henningsson in the upstream version of PulseAudio (0.9.22) The bug is caused by SSE/MMX optimised versions of code. If this is really annnoying you, you can try using the latest version of PulseAudio directly from experimental/Oneiric, but they aren't tested fully, and could cause data loss.

Once up and running, you should now be able to set your 5.1 channel audio device as a the output device in foobar2000.

EDIT: Things have changed since I wrote this post, and the audio layer was rewritten in Wine 1.3.25. This makes pulseaudio redundant, but you will still need to use a patched binary if you wish to enable 6 channel audio. I upload patched binaries to my apt repo here.

8 thoughts on “Wine foobar2000 5.1 Surround

  1. Thanks for the article. Could you be more precise on which patches are required with newer wine ?

    • Hi T2C,

      I am still using the stable release of Wine, which currently version 1.4.x The updated patch I posted above is applicable there.

      I understand however that this is now redundant as of Wine 1.5.11 which now includes proper multichannel audio support. I haven't tested it though, so your mileage may vary.

      Jon

  2. Thanks for your response. I have one more question. I downloaded your patch but do not know how to install install it? I am unfamiliar with installing patches.

  3. I keep getting this error when I patch below

    root@LANBOX-HT:~/wine1.4# cd wine*
    root@LANBOX-HT:~/wine1.4/wine1.4-1.4.1# patch -p0 < /home/gorrila_king/Downloads/hardcode_6channel_audio.patch
    can't find file to patch at input line 3
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |--- a/dlls/winealsa.drv/mmdevdrv.c
    |+++ b/dlls/winealsa.drv/mmdevdrv.c
    --------------------------
    File to patch:

    • Hi Tarik,

      I'm not sure, I haven't looked. I'd recommend taking a look at 1.5.11+ though, as the audio support has been revamped in that version.

      Jon

Leave a Reply