diff options
-rw-r--r-- | streamer.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1456,14 +1456,20 @@ streamer_dsp_init (void) { streamer_dsp_postinit (); // load legacy eq settings from pre-0.5 - if (conf_find ("eq.", NULL)) { + if (eq && eqplug && conf_find ("eq.", NULL)) { eq->enabled = deadbeef->conf_get_int ("eq.enable", 0); char s[50]; - eqplug->set_param (eq, 0, (conf_get_str ("eq.preamp", "0", s, sizeof (s)), s)); + + // 0.4.4 was writing buggy settings, need to multiply by 2 to compensate + conf_get_str ("eq.preamp", "0", s, sizeof (s)); + snprintf (s, sizeof (s), "%f", atof(s)*2); + eqplug->set_param (eq, 0, s); for (int i = 0; i < 18; i++) { char key[100]; snprintf (key, sizeof (key), "eq.band%d", i); - eqplug->set_param (eq, 1+i, (conf_get_str (key, "0", s, sizeof (s)), s)); + conf_get_str (key, "0", s, sizeof (s)); + snprintf (s, sizeof (s), "%f", atof(s)*2); + eqplug->set_param (eq, 1+i, s); } // delete obsolete settings conf_remove_items ("eq."); |