summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--streamer.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/streamer.c b/streamer.c
index 85e241ec..abba8d7e 100644
--- a/streamer.c
+++ b/streamer.c
@@ -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.");