5x12 pentomino tiling

Sharing Audio


I'm a great fan of Logitech's Squeezebox range and I've wibbled about them in the past here. We have two, a Boom and a Classic and they're both excellent in their place but here in the study I wanted to use an emulator. There used to be a variety including gslimp3 (written in Python) and kslimp3 (in C) but now there's just Logitech's own SoftSqueeze written in Java.

Squeezebox And therein lies the problem. Java apps on the Linux desktop suck. I've never met on yet which didn't in some way. In the case of SoftSqueeze the problem is that it hogs the audio. So rather than opening it in the correct way it locks audio so no other application can open it at the same time. That means that even if it's not playing but it's still running when you play a video on a web site (say) you get no sound.

Equally annoyingly if you have another application open which has played sound recently (RealPlayer say, or Firefox) then it starts but the application never appears on the desktop. Java is still running, but it's not putting it's head over the parapet.

The problem appears to be down to the way Java treats sound. There's lots of postings about it around the Web. It's been reported as a bug for several years now but it's still not fixed.

Squeezebox Boom There is, allegedly, a work around and this afternoon I spent far too long trying to get it to work and failing miserably.

Then, just as I was going to give up, I discovered another software player. SqueezeSlave is a "headless" player. You invoke it from the command line and then control it from the Web interface. That's fine by me: it's how I prefer to control my players anyway.

Easy to install too as they provide a binary.

But it had exactly the same problem as SoftSqueeze. Sigh.

But then a moment of inspiration. I was thinking to myself "what I need is a baby Linux box to run this on" and then I remembered I had VirtualBox on this PC. I put it on to run Windows XP, mainly for testing web sites on Internet Explorer but also for other odd things we can't run on Linux. I even bought a legitimate copy of XP! And it works a treat doing that.

So why not build a Linux Virtual Machine (VM) and run SqueezeSlave on that. So I built an Ubuntu Jaunty server (I already had an ISO file on my PC so I was able to boot straight off that), put nothing on it but alsa and SqueezeSlave and after a bit of faffing about1 it now works a treat.

  1. Biggest gotcha was that alsa mutes all the input and outputs initially, which is less than obvious when you first use 'alsamixer'.

Tags: linux, toys Written 23/09/09

Comment on this article

You can follow these posts on Twitter at @Wibblings
I am currently reading:

A Quite Impossible Proposal: How Not to Build a Railway by Andrew Drummond Snuff by Terry Pratchett

Word of the Day: