From 8671106160b3d9c50195a1741bd518e0353910ba Mon Sep 17 00:00:00 2001 From: waker Date: Wed, 8 Dec 2010 22:39:13 +0100 Subject: ported supereq gui to new dsp params API --- plugins/supereq/supereq.c | 51 +++++++++++++++++++++++------------------------ plugins/supereq/supereq.h | 31 ---------------------------- 2 files changed, 25 insertions(+), 57 deletions(-) delete mode 100644 plugins/supereq/supereq.h (limited to 'plugins/supereq') diff --git a/plugins/supereq/supereq.c b/plugins/supereq/supereq.c index 9ce7b9f8..e7cfa6cb 100644 --- a/plugins/supereq/supereq.c +++ b/plugins/supereq/supereq.c @@ -20,11 +20,10 @@ #include #include #include "../../deadbeef.h" -#include "supereq.h" #include "Equ.h" static DB_functions_t *deadbeef; -static DB_supereq_dsp_t plugin; +static DB_dsp_t plugin; typedef struct { DB_dsp_instance_t inst; @@ -221,7 +220,7 @@ supereq_get_param (DB_dsp_instance_t *inst, int p) { DB_dsp_instance_t* supereq_open (void) { ddb_supereq_instance_t *supereq = malloc (sizeof (ddb_supereq_instance_t)); - DDB_INIT_DSP_INSTANCE (supereq,ddb_supereq_instance_t,&plugin.dsp); + DDB_INIT_DSP_INSTANCE (supereq,ddb_supereq_instance_t,&plugin); equ_init (&supereq->state, 14); supereq->paramsroot = paramlist_alloc (); @@ -252,29 +251,29 @@ supereq_close (DB_dsp_instance_t *inst) { free (inst); } -static DB_supereq_dsp_t plugin = { - .dsp.plugin.api_vmajor = DB_API_VERSION_MAJOR, - .dsp.plugin.api_vminor = DB_API_VERSION_MINOR, - .dsp.plugin.version_major = 1, - .dsp.plugin.version_minor = 0, - .dsp.plugin.type = DB_PLUGIN_DSP, - .dsp.plugin.id = "supereq", - .dsp.plugin.name = "SuperEQ", - .dsp.plugin.descr = "equalizer plugin using SuperEQ library by Naoki Shibata", - .dsp.plugin.author = "Alexey Yakovenko", - .dsp.plugin.email = "waker@users.sourceforge.net", - .dsp.plugin.website = "http://deadbeef.sf.net", - .dsp.plugin.start = supereq_plugin_start, - .dsp.plugin.stop = supereq_plugin_stop, - .dsp.open = supereq_open, - .dsp.close = supereq_close, - .dsp.process = supereq_process, - .dsp.reset = supereq_reset, - .dsp.enable = supereq_enable, - .dsp.num_params = supereq_num_params, - .dsp.get_param_name = supereq_get_param_name, - .dsp.set_param = supereq_set_param, - .dsp.get_param = supereq_get_param, +static DB_dsp_t plugin = { + .plugin.api_vmajor = DB_API_VERSION_MAJOR, + .plugin.api_vminor = DB_API_VERSION_MINOR, + .plugin.version_major = 1, + .plugin.version_minor = 0, + .plugin.type = DB_PLUGIN_DSP, + .plugin.id = "supereq", + .plugin.name = "SuperEQ", + .plugin.descr = "equalizer plugin using SuperEQ library by Naoki Shibata", + .plugin.author = "Alexey Yakovenko", + .plugin.email = "waker@users.sourceforge.net", + .plugin.website = "http://deadbeef.sf.net", + .plugin.start = supereq_plugin_start, + .plugin.stop = supereq_plugin_stop, + .open = supereq_open, + .close = supereq_close, + .process = supereq_process, + .reset = supereq_reset, + .enable = supereq_enable, + .num_params = supereq_num_params, + .get_param_name = supereq_get_param_name, + .set_param = supereq_set_param, + .get_param = supereq_get_param, }; DB_plugin_t * diff --git a/plugins/supereq/supereq.h b/plugins/supereq/supereq.h deleted file mode 100644 index 2588df91..00000000 --- a/plugins/supereq/supereq.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - DeaDBeeF - ultimate music player for GNU/Linux systems with X11 - Copyright (C) 2009-2010 Alexey Yakovenko - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#ifndef __SUPEREQ_H -#define __SUPEREQ_H - -typedef struct DB_supereq_dsp_s { - DB_dsp_t dsp; - float (*get_band) (DB_dsp_instance_t *inst, int band); - void (*set_band) (DB_dsp_instance_t *inst, int band, float value); - float (*get_preamp) (DB_dsp_instance_t *inst); - void (*set_preamp) (DB_dsp_instance_t *inst, float value); -} DB_supereq_dsp_t; - -#endif -- cgit v1.2.3