[MPlayer-users] Software AC3 output

Stephen Davies steve at daviesfam.org
Fri Jan 4 11:03:07 CET 2002


On Fri, 4 Jan 2002, Sampo Nurmentaus wrote:

> I read the documentation about software AC3 and
> though about setting up a desktop system to act
> as an inexpensive home theater system.
> 
> It ses in the docs that multiple channel output
> is supported with an SB Live! card. How
> does this work in practice? Hardware thing is simple
> with spdif but it requires a separate decoder.
> 
> I would love to see six analog singnals coming out of
> my pc directly to my multichannel amp.
> 
> Is this supported or can someone give me some hints so
> that I can code support for exampel three separate
> stereo cards.


Hi Sampo,

Mplayer's multichannel support is designed for multi-channel sound
cards.  The sound is sent to the card in a single stream with all the
channels interleaved.  This is an extension of the stereo format, where
samples are sent left-right-left-right.  For 6 channel sound the samples
are send leftfront-rightfront-leftrear-rightrear-centre-lfe

I use this setup with my SBLive Player 5.1 card, but it should work with
other multichannel cards too.

It will be a challenge to try to instead drive several separate sound
cards.  It will be very hard to keep the sound exactly synchronized to
both cards.

But the way to do it in theory is simple: make a libao2 driver - probably
based on libao2/ao_oss.c - in there you'll need to open all the /dev/dsps,
split the audio and write to each card.  Take care as far as you can to
write exactly the same amount of data to each card.

If you do this, DVDs are one source of multi-channel audio.  But look also
at the surround plugin, a simple decoder that can get multi-channel audio
from Dolby Surround encoded audio.

Steve






More information about the MPlayer-users mailing list