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

Rémi Denis-Courmont rem at videolan.org
Sat Oct 11 20:01:46 CEST 2008


Le samedi 11 octobre 2008 18:22:03 Marcus Schmid, vous avez écrit :
> When opening a media file, vlc sets "Stereo" as default audio device,
> even if the audio stream played contains multiple channels and the
> hardware supports that number of channels. This is especially annoying
> when you watch movies that are split over multiple files but contain a
> 5.1 audiostream, because you have to manually set "5.1" as audio device
> after a new file of the set starts playing, which interrupts your
> entertainment.
>
> With the supplied patch, the ALSA audio output module gains support for
> a new configuration parameter, called "alsa-preferred-layout".

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

(...)

> +    p_item = config_FindConfig( p_this, psz_name );
> +    if( !p_item ) return VLC_SUCCESS;
> +
> +    /* free existing list and its textual descriptions */
> +    if( p_item->i_list )
> +    {
> +        free( (int *)p_item->pi_list );
> +
> +        for( i = 1; i < p_item->i_list; i++ )
> +            free( (char *)p_item->ppsz_list_text[i] );
> +    }

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

-- 
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary



More information about the vlc-devel mailing list