The ultimate Linux audio hack

published Oct 19, 2007, last modified Dec 08, 2021

Hang on to your hats, because what I’m about to show you, you just don’t see every day. As a matter of fact, I’m positive you haven’t seen it in your life, and let’s hope you don’t have to.

What do you do when:

  • You want to finish a mix set using Steinberg Nuendo.
  • You run Linux.
  • Your Wine setup broke after a recent OS upgrade.
  • Your desktop machine does not have a sound card
    • You can’t even put a sound card in your desktop machine, because it’s an 1U blade server.
    • But you own a separate slave machine with two sound cards, hooked up to a stereo.

Simple. You concoct the absolute hack:

  1. Network your desktop and slave machines via Ethernet.
  2. Install PulseAudio on the slave machine.
    1. Configure PulseAudio so it starts as a system-wide daemon.
    1. Activate EsounD compatibility on the PulseAudio server.
  3. Install VMWare on your desktop machine.
    1. Install Windows XP on a VMWare virtual machine in your desktop server.
    2. Network your XP virtual machine into the Ethernet LAN you already have.
    3. Install WinESD on your XP virtual machine.
    4. Set it up to communicate with the slave machine.
  4. Just for kicks (and everyday music enjoyment):
    1. Set your desktop machine to use the PulseAudio server in the slave machine as the system-wide audio output.
    2. Set up the volume control menu entry to run the volume control in the slave machine directly, displaying it back on your desktop machine.
    3. Hook desktop event notifications to Festival so your desktop machine speaks loud and clear through your stereo.

Today, I did it. I completed the Perfect Setup even more perfectly than the original Perfect Setup. And I have proof:

The ultimate PulseAudio sound hack

 

Points to ponder:

  • You’re witnessing my desktop computer’s KDE desktop.
  • The black window to the left with Winamp and the Sound properties capplet is Windows XP running under VMWare. It’s a virtual machine.
  • The window at the right is a set of VU meters included with the PulseAudio monitoring and configuration software. That monitor is running on my machine, but it’s actually monitoring the audio output on the slave machine (conveniently tucked away in a corner).
  • See the terminal window? I put that there so you could see that the host name of the desktop machine is karen, while the host name of the machine serving PulseAudio is gabriela (you can tell that by looking at the PulseAudio manager.
  • The little parrot at the top right corner of the screen is the KTTSD agent in charge of speaking notifications out loud.
  • The speaker icon is the KMix volume control. Obviously, it’s not running on my desktop machine, but rather via SSH X Window forwarding on the other computer.

This would have never happened thanks to the work of many talented people who actually wrote the software that powers this Rube Goldberg contraption. Not to mention that I just saved $150 in an USB sound card. I think I’m gonna spend that money on drinks tonight, just because I can.

Next step, getting me a second headless computer with WiFi and hooking it up to the stereo in my room, then have PulseAudio broadcast the audio via RTP on the local network. It’d be nice not having to get out of bed to listen to music. Just kidding! That would be overengineering… but, oh, well, this post is the bastard child of overengineering, isn’t it?

Thanks, Lennart!

Update: it turns out Steinberg Nuendo is quite picky in its choice of audio drivers, and WinESD is just too poor for it.  Therefore, I reverted to running Windows XP on a VMware virtual machine in the headless slave computer with the sound card, and displaying VMware via VNC (read it, it’s got screenshots!). Besides, if you manage to run Steinberg Nuendo with Wine directly (mine broke:-( ), it’s much, much faster, so do that instead.