[LONG] Mixers - suggestions needed

Gildas Bazin gbazin at netcourrier.com
Mon Mar 18 21:23:44 CET 2002


On Monday 18 March 2002 16:41, Loïc Minier wrote:
>
>  But you're right, it's not a good idea to store anything else than the
> number of opened windows in the gtk part. This number or an equivalent
> is required because the windows have to be kept, not destroyed.
> 
I still don't see why you want to keep track of the number of opened 
windows (mixer windows). I really think there should be only one mixer 
setting per interface, and not per decoder or anything else.
For example with the gtk interface you will add a "mixer" entry in the 
"settings" menu. When the user wants to change the channels gains he will 
just have to open this menu and the mixer will appear. If the stream 
finishes or changes, we can just gray out in the mixer the channels that 
aren't currently accessible.

> > Obviously we would also have to set a maximum limit to the number of 
> > channels supported by vlc.
> > - this gain array would be initialized on startup from a config file 
option.
> 
>  I don't know, it really seems ugly to store each conversion setting.
> I'm thinking here of the different number of channels we have to handle,
> we would then have 2 settings for a 2 channel stream, 4 more for a 4
> channel stream etc. That sums up to 18 settings to keep.
> 

I was thinking about a generic array, something like:
CENTER_CHANNEL
LEFT_CHANNEL
RIGHT_CHANNEL
REAR_CENTER
REAR_LEFT
REAR_RIGHT
BASS_CHANNEL
etc...

If you are using stereo then only the LEFT and RIGHT channels would be 
meaningfull, if you use mono then only the CENTER channel, etc...
(This is also why I said that we should agree on a maximum number of 
channels we would like to support)
This array could be stored as a string into the config file:
channel_gains=1:1:1:1:1:1:1 or whatever

> 
>  I didn't get everything here, I don't see where you want the downmix
> and decoding be actually done.
> 
I was just saying that because liba52 can also do the downmixing 
internally, then we should as well propose the choice to the user (with a 
config option):
- performant solution: let liba52 do the downmixing but then you cannot use 
the mixer (well the mixer sees only the result channels after the 
downmixing).
- flexible solution: vlc will do the downmixing and thus you can fully use 
the mixer, but you've been warned that this method might eat a bit more CPU.

As you said it might not be worth it to propose the 1st solution.

> > you will have to first re-work the audio output architecture of vlc
> 
>  Hmmm, I hope I'm capable of that   :^/
> 
>  This is what I've understood/thought for a mixer-compatible arch :
> 
> 
>                         input
>                           |
>                       AC3 parser                             parser
>                           |
>       _______________________________________
>       x              x                      x
> spdif decoder   ac3 decoder              liba52              decoder
>       |              |                      |
>       |              |              ________________
>       |              |              x              x
>       |            mixer          mixer            |         filter
>       |              |              |              |
>       |           downmix        downmix           |         filter
>       |              |              |              |
>  spdif aout     dsp esd alsa   dsp esd alsa   dsp esd alsa   output
> 
> 
>  Of course a lot of other combinations are possible, this was just to
> show how I'd like to organize the different parts.
> 

Yeah, you've got the point :)

Cheers,

--
Gildas

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list