[vlc-devel] [PATCH 1/3] libvlc: introduce 'Muted' as a whole state, not as volume 0

Rémi Denis-Courmont remi at remlab.net
Thu Jan 7 20:29:49 CET 2010


Le jeudi 7 janvier 2010 21:18:29 Francois Cartegnie, vous avez écrit :
> @@ -167,11 +166,33 @@ int __aout_VolumeDown( vlc_object_t * p_object, int
>  i_nb_steps,
>  **************************************************************************
> ***/
> int __aout_ToggleMute( vlc_object_t * p_object, audio_volume_t *
>  pi_volume )
>  {
> +    return aout_SetMute( p_object, pi_volume, !aout_IsMuted( p_object ) );
> +}

I was under the impression we had a var_ToggleBool() to do exactly that, but 
atomically.

> +bool aout_IsMuted( vlc_object_t * p_object )
> +{
> +    return (bool)var_GetBool( p_object->p_libvlc, "volume-muted");
> +}

Casting is superfluous.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list