diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-03-20 19:11:31 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-03-20 19:11:31 +0100 |
commit | 175c96d5246f3bbdb8ddd5c9379191d030a9848b (patch) | |
tree | c04a18c2d15c2d80d228853296eef0cb76556c52 /plugins/supereq | |
parent | eef7400dc4c55adf166a09142d859900d537c803 (diff) |
save/load EQ config
Diffstat (limited to 'plugins/supereq')
-rw-r--r-- | plugins/supereq/supereq.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/supereq/supereq.c b/plugins/supereq/supereq.c index f9f98940..ed9bc43b 100644 --- a/plugins/supereq/supereq.c +++ b/plugins/supereq/supereq.c @@ -16,6 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <stdio.h> #include "../../deadbeef.h" #include "supereq.h" @@ -41,6 +42,13 @@ static uintptr_t mutex = 0; int supereq_plugin_start (void) { + // load bands from config + for (int i = 0; i < 18; i++) { + char key[100]; + snprintf (key, sizeof (key), "eq.band%d", i); + lbands[i] = rbands[i] = deadbeef->conf_get_float (key, 1); + } + equ_init (14); paramsroot = paramlist_alloc (); last_srate = 44100; @@ -113,6 +121,9 @@ supereq_set_band (int band, float value) { lbands[band] = rbands[band] = value; deadbeef->mutex_unlock (mutex); params_changed = 1; + char key[100]; + snprintf (key, sizeof (key), "eq.band%d", band); + deadbeef->conf_set_float (key, value); } static DB_supereq_dsp_t plugin = { |