[Openal] Openal, S/PDIF and surround

Peter Mulholland darkmatter at blueyonder.co.uk
Tue May 20 16:06:01 PDT 2008


Hello Alfredo,

Tuesday, May 20, 2008, 11:46:22 PM, you wrote:

> Hi list,
> I'm writing here for some support, because I searched and experimented a
> lot, but I was unable to make my openal configuration work.

> On my computer, I only use S/PDIF for output. When I listen to music, 
> the stereo data are sent through S/PDIF, and everything is OK. When I 
> watch a DVD, then the AC3 passthrough on S/PDIF works with no problem,
> and my receiver decodes it correctly.

When you watch a DVD, the AC3 encoded data is already stored on the
DVD and is simply being sent out through the S/PDIF connector. No
encoding takes place on your machine - it has been done ahead of time,
and stored.

> And now with openal. Openal is sending stereo data through S/PDIF 
> perfectly. However, I would like it to send AC3 data (or any other sort
> of surround data) over S/PDIF, so that I could enjoy my games 
> (tremulous, for instance) with full surround effect. Searching around, I
> found only configurations using the "surround40" or "surround51" 
> interfaces, which I think is not my case. I also tried to specify 
> "spdif", "spdif:0", "hw:0,1" (the digital playback) as interfaces, and
> 4,5,6 as channel numbers. However, I could never get surround sound, 
> only stereo data were sent over S/PDIF.

This is because data would have to be encoded from OpenAL or your
sound card into AC3 and then sent through SPDIF. This is too much
overhead in software.

> Where am I wrong? Is it possible to obtain what I'm looking for? In the
> case openal is not able to generate AC3 directly, is it possible to let
> openal generate the 6 channels audio, and then encode them in AC3 via 
> software, and send them via S/PDIF?

The solution is to get a sound card that has hardware AC3 encoding
support. There are only a few of them - nVidia's Soundstorm is one
solution, and I belive there is another based on some C-media chipset.
They should work with OpenAL using the "Generic Hardware" device,
except on Vista which doesn't allow any sound acceleration at all.

Of course, if you're talking about Linux, forget it - unless someone
does something with a software AC3 encoder for ALSA, it won't happen.

-- 
Best regards,
 Peter                            mailto:darkmatter at blueyonder.co.uk



More information about the Openal mailing list