]> git.sesse.net Git - vlc/commitdiff
Muting and unmuting functions implemented in the control interface
authorFilippo Carone <littlejohn@videolan.org>
Sat, 10 Jun 2006 15:34:32 +0000 (15:34 +0000)
committerFilippo Carone <littlejohn@videolan.org>
Sat, 10 Jun 2006 15:34:32 +0000 (15:34 +0000)
src/control/audio.c

index 3ce4d4b683596ba70cc3b93c2ef02f3f2e5a1f44..1713ba686b52bb0531a7529820441e9e02365579 100644 (file)
@@ -56,12 +56,25 @@ void libvlc_audio_set_mute( libvlc_instance_t *p_instance, vlc_bool_t status,
 {
     if ( status )
     {
-        /// \todo
+        /*
+         * Check if the volume is already muted
+         */
+        if (! libvlc_audio_get_volume( p_instance, p_exception ) )
+        {
+            return;
+        }
+        
+        aout_VolumeMute( p_instance->p_vlc, NULL );
+        return;
+        
     }
     else
     {
-        /* we need to get the volume back from the last registered level */
-        /// \todo FIXME here
+        /*
+         * the aout_VolumeMute is a toggle function, so this is enough.
+         */
+        aout_VolumeMute( p_instance->p_vlc, NULL );
+        return;
     }
 }