[vlc-devel] [PATCH] Added new config parameter "alsa-preferred-layout" to allow preselection of speaker layout when playing media files.

Marcus Schmid doc at lanaticasylum.de
Sat Oct 11 20:24:29 CEST 2008

On Sat, 11 Oct 2008, Rémi Denis-Courmont wrote:

> I don't understand why this needs yet another intricate configuration knob.
> Should this not be auto-detected anyway?

Although it actually already is auto-detected which speaker configurations
_could_ be available, the system has not necessarily a way to detect what
kind of speakers are really connected at runtime (using Windows I could
think that such a detection could be possible as the user can easily
change the speaker configuration in some fancy dialog, but I'm not sure
this can be done easily with ALSA capable systems?); for example I do have
a 5.1 capable soundcard, but there is only a pair of speakers connected to
it.  On the other hand, in the other room there's a PC with a 5.1
soundcard and respective speakers. Some other user might choose to play a
special fileset with only 2 speakers although 6 speakers are connected to
his machine.

So I'd say a user-configurable option wouldn't do too much harm but be of
use to some users in special cases.

> Hmm, it looks like it will crash if another thread reads the configuration at
> the same time. (And yeah, FindDevicesCallback() seems broken already)

Indeed, that is possible! (I just didn't think of threads, I must
admit... Also, I just looked at the already present FindDevicesCallback()
to learn how to do it - obviously that code snippet was a bad example...)

Is there some kind of locking mechanism for configuration parameters?

Marcus Schmid

More information about the vlc-devel mailing list