Re: Polypaudio for Gnome 2.10, the next steps
- From: Bastien Nocera <hadess hadess net>
- To: Lennart Poettering <mztabzr 0pointer de>
- Cc: desktop-devel-list gnome org
- Subject: Re: Polypaudio for Gnome 2.10, the next steps
- Date: Wed, 24 Nov 2004 23:24:38 +0000
On Wed, 2004-11-24 at 23:24 +0100, Lennart Poettering wrote:
> On Wed, 24.11.04 21:39, Bastien Nocera (hadess hadess net) wrote:
>
> > To use polyaudio by default in Totem, I'd need to know whether it
> > supports 4.0, 4.1 and 5.1 outputs, and, if so, what it does for stereo
> > (or mono) streams fed to a sound system that has more speakers than
> > that.
>
> Polypaudio is flexible regarding the number of channels. You may use
> one, two, or more. All channels are treated the same. I don't have
> {4,5}.{0,1} equipment here, so I am unable to test it. I assume that
> everything works fine if the underlying driver supports it.
What's not really clear to me is:
- random application's "dings" (I prefer "beeps", but whatever)
- audio output device is opened in stereo because that's what the
stream/audio file needs
- audio device is still opened in stereo, and I want to play a DVD, on
the 5.1 output.
What happens?
> The current mixing code for merging or forking channels is very
> simple. If the channel number of the input stream matches that of the
> output device, the stream is not touched. Otherwise all channels are
> mixed down to a single one and after that copied to all output
> channels. For the special cases where only one or two channels are
> involved, everything works as expected. However, if you want to
> playback 5 channel sound on a stereo sound device, you won't get happy
> with the current code. Yepp. I should really fix that. I know. Someone
> should donate some 4.1 speakers to me... ;-)
I don't have the kit either, and if I had, it probably wouldn't be
plugged in a computer...
> What is the algorithm you'd expect? Perhaps something like this:
>
> n1 is the number of channels of the input stream, n2 is the number of
> channels of the output stream:
>
> 1. if n1 == n2, don't touch the data
> 2. if n2 == 1, mix all n1 channels t
> 3. if n2 > n1, copy n1 channels, fill all others with silence
There are some "post" plugins for xine that "upsample" a stream in that
case. So that, playing a CD will use all the speakers, not just 2 of
them, for example.
> 4. if n2 < n1, copy n2 channels
That's an easy one to try, and you would lose data doing that. Most
living-room DVD players will mix both right and both left speakers, and
spread the middle speaker between the 2 sides when playing a 5.1
soundtrack on stereo equipment.
> Do i need explicit support for 4.0, 4.1 or 5.1?
Polyaudio would need explicit support for those. There's no way of auto-
detecting which type if the output, and that means that you'll get a
drop-down in Totem asking you which type of audio you have. From what I
can understand, if no application at all uses the sound, and a DVD with
a 5.1 soundtrack starts playing in Totem, then it will use a 5.1 output.
While the soundcard supports it, there's usually nothing plugged into
that output (the digital one), so the user won't get any sound.
> Perhaps for distinguishing 4.1 from 5.0?
There are a lot more than just those, many of them are useless though.
If you want to play with those settings, you can try the
audio.speaker_arrangement option in the xine config files.
Another stupid question, if I select "AC-3 Passthrough" in the xine
plugin, is polyaudio (the plugin, or the daemon/libs) able to pass that
data to the audio driver?
---
Bastien Nocera <hadess hadess net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]