Something that had been bothering me for a while is that I have a full 5.1 setup hooked up to my MacBook Pro (via a USB SoundBlaster Live sound card), but generally end up using only two of the speakers. While native 5.1 content (DVDs, HD trailers) does play out all six speakers, any stereo source (like music in iTunes) uses only the two front speakers. Most annoyingly, the subwoofer just sits there doing nothing.
I finally figured out how to make stereo sound sources take advantage of the entire setup, with the help of various tools. Luckily, these are all free.
The most important tool is Soundflower. Soundflower adds two input/output sound devices (one stereo, and one 16-channel). These are actually very simple pass-throughs — any sound routed to the inputs appears at the outputs (For example, you can set default output to the stereo Soundflower device; and another to takes its input from the Soundflower device — viola! Instant full-system sound recorder!). It’s pretty simple, but very powerful. (Caveat: installation requires a reboot, since it’s creating new sound devices)
Another very useful tool (although not strictly necessary for what we’re doing here) is Soundsource. Soundsource sits in your menu bar, and allows you to select which output device is currently active. You’ll be changing this around quite a bit as you get this whole setup working, so I’d suggest you install it.
Finally, if you haven’t installed the OS X development tools, do so now. They’re on the disks that shipped with your machine.
Got all that installed? Good. Now the fun begins.
On the “SoundSource” menu, select “Open Audio MIDI Setup”. (If you haven’t installed SoundSource, you can find this in “Applications”, under “Utilities”). On the “Audio” menu, select “Open Aggregate Device Editor”. Add an aggregate device, and name it something useful (I called mine “Soundflower Stereo + SB Live”). Select the new aggregate device, and check “Soundflower (2ch)” and whatever your 5.1 soundcard output is (look for a “6″ in the out column). You’ll want to make sure the soundflower appears first in the list. You probably want to select the soundcard as the clock source. You can now close the Audio MIDI Setup application.
The newly created aggregate device should show up in your AudioSelector menu; and it will probably be selected. We haven’t routed the sound anywhere yet, so any sounds your machine wants to make now won’t come out anywhere.
Now, open up the “AU Lab” program — you’ll find it under /Developer/Applications/Audio. You should be in the “Create New Document” window. Make sure the “Audio Device” is set to the aggregate device you created — there should be 8 channels indicated. If you don’t see 8 channels, try changing from the aggregate device to a real device and back again. Now, click “Add Output” three times — you should have four outputs total. Select output 3 and change it to mono. Drag it to channel 5 (this is your center channel). Select output 4, set it to mono, and drag it to channel 6 (this is your subwoofer). Now, grab output 2 and drag it to channels 7 and 8 (this is your rear channel); and, finally, drag output 1 to channels 3 and 4 (front channel).
Don’t worry — we’re almost there.
Now, under “Inputs,” there should be one input. Sometimes it creates it automatically for you; sometimes you need to add it. Click on “OK”, and you should get a window with a bunch of sliders on it. The lower-left slider should have four little boxes along its left side, labeled “1″ through “4″, indicating which outputs this input is routed to. Click on “2″, “3″, and “4″ to light them all up. As long as your output is still set to the aggregate device, you should now have music coming all all 6 speakers. Save this document before you close the AU Lab program.
One thing to note: the AU Lab program needs to be actively running to route sound from the Soundflower inputs to the outputs on your 5.1 soundcard. If you close AU Lab, your sound is once again routing to nowhere — but this is easily remedied by selecting a real device in the SoundSource menu.
You can play around with various effects on the channels to differentiate them. For example, I put a low-pass filter on my subwoofer; added a “Matrix” effect to the center channel to “enhance” the stereo; and put a 0.016 second delay on the rear channel.
One last troubleshooting trick that might help if you can’t get the audio flowing: soundflower and your soundcard need to be set to the same sample frequency or things just won’t work. I also had trouble converting 24-bit samples to 32-bit samples, but 16-bit to 32-bit seemed to work just fine. You can tweak these settings in the “Audio MIDI Setup” application.
As an aside — you don’t want this configuration active when watching actual 5.1 sources, as it will not only route the front channels to all six speakers; it will also send the center channel to the left front speaker; the subwoofer channel to the right front speaker; the rear left channel to the center speaker; and the rear right channel to the subwoofer speaker.