[vlc-commits] aout: remove unused "equalizer" object variable

Rémi Denis-Courmont git at videolan.org
Sat May 24 06:46:03 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 24 11:55:02 2014 +0800| [19ccbcb36de2abd1075c825c00ad52a0964bed38] | committer: Rémi Denis-Courmont

aout: remove unused "equalizer" object variable

This is no longer set anywhere, since equalizer-preset superseded it.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=19ccbcb36de2abd1075c825c00ad52a0964bed38
---

 src/audio_output/filters.c |    5 -----
 src/audio_output/output.c  |   18 ++----------------
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index 1f7bbd4..17973d8 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -315,8 +315,6 @@ static int EqualizerCallback (vlc_object_t *obj, const char *var,
                               void *data)
 {
     const char *val = newval.psz_string;
-    if (!strcmp("equalizer", var) && *val)
-        var_SetString (obj, "equalizer-preset", val);
 
     if (aout_ChangeFilterString (obj, obj, "audio-filter", "equalizer", *val))
         aout_InputRequestRestart ((audio_output_t *)obj); /* <- That sucks! */
@@ -416,7 +414,6 @@ aout_filters_t *aout_FiltersNew (vlc_object_t *obj,
     /* Callbacks (before reading values and also before return statement) */
     if (request_vout != NULL)
     {
-        var_AddCallback (obj, "equalizer", EqualizerCallback, NULL);
         var_AddCallback (obj, "equalizer-bands", EqualizerCallback, NULL);
         var_AddCallback (obj, "visual", VisualizationCallback, NULL);
 
@@ -496,7 +493,6 @@ aout_filters_t *aout_FiltersNew (vlc_object_t *obj,
 
 error:
     aout_FiltersPipelineDestroy (filters->tab, filters->count);
-    var_DelCallback (obj, "equalizer", EqualizerCallback, NULL);
     var_DelCallback (obj, "equalizer-bands", EqualizerCallback, NULL);
     var_DelCallback (obj, "visual", VisualizationCallback, NULL);
     free (filters);
@@ -519,7 +515,6 @@ void aout_FiltersDelete (vlc_object_t *obj, aout_filters_t *filters)
     aout_FiltersPipelineDestroy (filters->tab, filters->count);
     if (obj != NULL)
     {
-        var_DelCallback (obj, "equalizer", EqualizerCallback, NULL);
         var_DelCallback (obj, "equalizer-bands", EqualizerCallback, NULL);
         var_DelCallback (obj, "visual", VisualizationCallback, NULL);
     }
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 86a9506..bfaad8e 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -266,22 +266,6 @@ audio_output_t *aout_New (vlc_object_t *parent)
         free (str);
     }
 
-    /* Equalizer */
-    var_Create (aout, "equalizer", VLC_VAR_STRING | VLC_VAR_HASCHOICE);
-    text.psz_string = _("Equalizer");
-    var_Change (aout, "equalizer", VLC_VAR_SETTEXT, &text, NULL);
-    val.psz_string = (char*)"";
-    text.psz_string = _("Disable");
-    var_Change (aout, "equalizer", VLC_VAR_ADDCHOICE, &val, &text);
-    cfg = config_FindConfig (VLC_OBJECT(aout), "equalizer-preset");
-    if (likely(cfg != NULL))
-        for (unsigned i = 0; i < cfg->list_count; i++)
-        {
-            val.psz_string = cfg->list.psz[i];
-            text.psz_string = vlc_gettext(cfg->list_text[i]);
-            var_Change (aout, "equalizer", VLC_VAR_ADDCHOICE, &val, &text);
-        }
-
     var_Create (aout, "audio-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
     text.psz_string = _("Audio filters");
     var_Change (aout, "audio-filter", VLC_VAR_SETTEXT, &text, NULL);
@@ -306,8 +290,10 @@ audio_output_t *aout_New (vlc_object_t *parent)
                             &val, &text);
         }
 
+    /* Equalizer */
     var_Create (aout, "equalizer-preamp", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
     var_Create (aout, "equalizer-bands", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
+    var_Create (aout, "equalizer-preset", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
 
     return aout;
 }



More information about the vlc-commits mailing list