summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-12-29 13:37:25 +0100
committerGravatar waker <wakeroid@gmail.com>2010-12-29 13:37:25 +0100
commite0cbea84d47fc015e8841df057424c99ede710fb (patch)
treef77ec4c0b651a1a6a823104caa453fd95276eaf2 /plugins
parent3006987a919881cd3053288c6e677a9adf07a08e (diff)
dsp chain configuration WIP
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/Makefile.am3
-rw-r--r--plugins/gtkui/callbacks.h20
-rw-r--r--plugins/gtkui/deadbeef.glade135
-rw-r--r--plugins/gtkui/dspconfig.c280
-rw-r--r--plugins/gtkui/dspconfig.h29
-rw-r--r--plugins/gtkui/interface.c81
-rw-r--r--plugins/gtkui/interface.h1
-rw-r--r--plugins/gtkui/prefwin.c5
8 files changed, 553 insertions, 1 deletions
diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am
index cea8e94dc..ad092499 100644
--- a/plugins/gtkui/Makefile.am
+++ b/plugins/gtkui/Makefile.am
@@ -32,7 +32,8 @@ GTKUI_SOURCES = gtkui.c gtkui.h\
plcommon.c plcommon.h\
prefwin.c\
eq.c eq.h\
- actions.c actions.h
+ actions.c actions.h\
+ dspconfig.c dspconfig.h
EXTRA_DIST = $(gtkui_VALASOURCES) deadbeef.glade
diff --git a/plugins/gtkui/callbacks.h b/plugins/gtkui/callbacks.h
index e99eef49..55c00edb 100644
--- a/plugins/gtkui/callbacks.h
+++ b/plugins/gtkui/callbacks.h
@@ -1021,3 +1021,23 @@ on_shuffle_albums1_activate (GtkMenuItem *menuitem,
void
on_order_shuffle_albums_activate (GtkMenuItem *menuitem,
gpointer user_data);
+
+void
+on_dsp_add_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_dsp_remove_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_dsp_configure_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_dsp_up_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_dsp_down_clicked (GtkButton *button,
+ gpointer user_data);
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index 4192ce71..8d9bc40a 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -2752,6 +2752,7 @@ Album</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_dsp_add_clicked" last_modification_time="Wed, 29 Dec 2010 11:54:39 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -2768,6 +2769,7 @@ Album</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_dsp_remove_clicked" last_modification_time="Wed, 29 Dec 2010 11:54:43 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -2784,6 +2786,7 @@ Album</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_dsp_configure_clicked" last_modification_time="Wed, 29 Dec 2010 11:54:47 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -2849,6 +2852,7 @@ Album</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_dsp_up_clicked" last_modification_time="Wed, 29 Dec 2010 11:54:52 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -2865,6 +2869,7 @@ Album</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_dsp_down_clicked" last_modification_time="Wed, 29 Dec 2010 11:54:55 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -6451,4 +6456,134 @@ Descending</property>
</child>
</widget>
+<widget class="GtkDialog" id="select_dsp_plugin">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Select DSP Plugin</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">True</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area9">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton7">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton7">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox31">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox85">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
+
+ <child>
+ <widget class="GtkLabel" id="label113">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Plugin</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="plugin">
+ <property name="visible">True</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff --git a/plugins/gtkui/dspconfig.c b/plugins/gtkui/dspconfig.c
new file mode 100644
index 00000000..1a6ca556
--- /dev/null
+++ b/plugins/gtkui/dspconfig.c
@@ -0,0 +1,280 @@
+/*
+ DeaDBeeF - ultimate music player for GNU/Linux systems with X11
+ Copyright (C) 2009-2010 Alexey Yakovenko <waker@users.sourceforge.net>
+
+ 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.
+*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <assert.h>
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+#include "deadbeef.h"
+#include "gtkui.h"
+
+static ddb_dsp_context_t *chain;
+static GtkWidget *prefwin;
+
+static ddb_dsp_context_t *
+dsp_clone (ddb_dsp_context_t *from) {
+ ddb_dsp_context_t *dsp = from->plugin->open ();
+ char param[2000];
+ if (from->plugin->num_params) {
+ int n = from->plugin->num_params ();
+ for (int i = 0; i < n; i++) {
+ from->plugin->get_param (from, i, param, sizeof (param));
+ dsp->plugin->set_param (dsp, i, param);
+ }
+ }
+ return dsp;
+}
+
+static void
+fill_dsp_chain (GtkListStore *mdl) {
+ ddb_dsp_context_t *dsp = chain;
+ while (dsp) {
+ GtkTreeIter iter;
+ gtk_list_store_append (mdl, &iter);
+ gtk_list_store_set (mdl, &iter, 0, dsp->plugin->plugin.name, -1);
+ dsp = dsp->next;
+ }
+}
+
+void
+dsp_setup_init (GtkWidget *_prefwin) {
+ prefwin = _prefwin;
+ // copy current dsp chain
+ ddb_dsp_context_t *streamer_chain = deadbeef->streamer_get_dsp_chain ();
+
+ ddb_dsp_context_t *tail = NULL;
+ while (streamer_chain) {
+ ddb_dsp_context_t *new = dsp_clone (streamer_chain);
+ if (tail) {
+ tail->next = new;
+ tail = new;
+ }
+ else {
+ chain = tail = new;
+ }
+ streamer_chain = streamer_chain->next;
+ }
+
+ // fill dsp_listview
+ GtkWidget *listview = lookup_widget (prefwin, "dsp_listview");
+
+
+ GtkCellRenderer *title_cell = gtk_cell_renderer_text_new ();
+ GtkTreeViewColumn *col = gtk_tree_view_column_new_with_attributes (_("Plugin"), title_cell, "text", 0, NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (listview), GTK_TREE_VIEW_COLUMN (col));
+ GtkListStore *mdl = gtk_list_store_new (1, G_TYPE_STRING);
+ gtk_tree_view_set_model (GTK_TREE_VIEW (listview), GTK_TREE_MODEL (mdl));
+
+ fill_dsp_chain (mdl);
+}
+
+void
+dsp_setup_free (void) {
+ while (chain) {
+ ddb_dsp_context_t *next = chain->next;
+ chain->plugin->close (chain);
+ chain = next;
+ }
+ prefwin = NULL;
+}
+
+static void
+fill_dsp_plugin_list (GtkListStore *mdl) {
+ struct DB_dsp_s **dsp = deadbeef->plug_get_dsp_list ();
+ int i;
+ for (i = 0; dsp[i]; i++) {
+ GtkTreeIter iter;
+ gtk_list_store_append (mdl, &iter);
+ gtk_list_store_set (mdl, &iter, 0, dsp[i]->plugin.name, -1);
+ }
+}
+
+void
+on_dsp_add_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkWidget *dlg = create_select_dsp_plugin ();
+ gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_OK);
+ gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (prefwin));
+ gtk_window_set_title (GTK_WINDOW (dlg), _("Add plugin to DSP chain"));
+
+ GtkComboBox *combo;
+ // fill encoder presets
+ combo = GTK_COMBO_BOX (lookup_widget (dlg, "plugin"));
+ GtkListStore *mdl = GTK_LIST_STORE (gtk_combo_box_get_model (combo));
+ fill_dsp_plugin_list (mdl);
+ gtk_combo_box_set_active (combo, deadbeef->conf_get_int ("converter.last_selected_dsp", 0));
+
+ int r = gtk_dialog_run (GTK_DIALOG (dlg));
+ if (r == GTK_RESPONSE_OK) {
+ // create new instance of the selected plugin
+ int idx = gtk_combo_box_get_active (combo);
+ struct DB_dsp_s **dsp = deadbeef->plug_get_dsp_list ();
+ int i;
+ ddb_dsp_context_t *inst = NULL;
+ for (i = 0; dsp[i]; i++) {
+ if (i == idx) {
+ inst = dsp[i]->open ();
+ break;
+ }
+ }
+ if (inst) {
+ // append to DSP chain
+ ddb_dsp_context_t *tail = chain;
+ while (tail && tail->next) {
+ tail = tail->next;
+ }
+ if (tail) {
+ tail->next = inst;
+ }
+ else {
+ chain = inst;
+ }
+
+ // reinit list of instances
+ GtkWidget *list = lookup_widget (prefwin, "dsp_listview");
+ GtkListStore *mdl = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW(list)));
+ gtk_list_store_clear (mdl);
+ fill_dsp_chain (mdl);
+ }
+ else {
+ fprintf (stderr, "prefwin: failed to add DSP plugin to chain\n");
+ }
+ }
+ gtk_widget_destroy (dlg);
+}
+
+
+void
+on_dsp_remove_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkWidget *list = lookup_widget (prefwin, "dsp_listview");
+ GtkTreePath *path;
+ GtkTreeViewColumn *col;
+ gtk_tree_view_get_cursor (GTK_TREE_VIEW (list), &path, &col);
+ if (!path || !col) {
+ // nothing selected
+ return;
+ }
+ int *indices = gtk_tree_path_get_indices (path);
+ int idx = *indices;
+ g_free (indices);
+ if (idx == -1) {
+ return;
+ }
+
+ ddb_dsp_context_t *p = chain;
+ ddb_dsp_context_t *prev = NULL;
+ int i = idx;
+ while (p && i--) {
+ prev = p;
+ p = p->next;
+ }
+ if (p) {
+ if (prev) {
+ prev->next = p->next;
+ }
+ else {
+ chain = p->next;
+ }
+ p->plugin->close (p);
+ GtkListStore *mdl = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW(list)));
+ gtk_list_store_clear (mdl);
+ fill_dsp_chain (mdl);
+ path = gtk_tree_path_new_from_indices (idx, -1);
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, col, FALSE);
+ gtk_tree_path_free (path);
+ }
+}
+
+static ddb_dsp_context_t *current_dsp_context = NULL;
+
+void
+dsp_ctx_set_param (const char *key, const char *value) {
+ current_dsp_context->plugin->set_param (current_dsp_context, atoi (key), value);
+}
+
+void
+dsp_ctx_get_param (const char *key, char *value, int len, const char *def) {
+ strncpy (value, def, len);
+ current_dsp_context->plugin->get_param (current_dsp_context, atoi (key), value, len);
+}
+
+void
+on_dsp_configure_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GtkWidget *list = lookup_widget (prefwin, "dsp_listview");
+ GtkTreePath *path;
+ GtkTreeViewColumn *col;
+ gtk_tree_view_get_cursor (GTK_TREE_VIEW (list), &path, &col);
+ if (!path || !col) {
+ // nothing selected
+ return;
+ }
+ int *indices = gtk_tree_path_get_indices (path);
+ int idx = *indices;
+ g_free (indices);
+ if (idx == -1) {
+ return;
+ }
+ ddb_dsp_context_t *p = chain;
+ int i = idx;
+ while (p && i--) {
+ p = p->next;
+ }
+ if (!p || !p->plugin->configdialog) {
+ return;
+ }
+ current_dsp_context = p;
+ ddb_dialog_t conf = {
+ .title = p->plugin->plugin.name,
+ .layout = p->plugin->configdialog,
+ .set_param = dsp_ctx_set_param,
+ .get_param = dsp_ctx_get_param,
+ };
+ gtkui_run_dialog (prefwin, &conf, 0);
+ current_dsp_context = NULL;
+}
+
+
+void
+on_dsp_up_clicked (GtkButton *button,
+ gpointer user_data)
+{
+
+}
+
+
+void
+on_dsp_down_clicked (GtkButton *button,
+ gpointer user_data)
+{
+
+}
+
diff --git a/plugins/gtkui/dspconfig.h b/plugins/gtkui/dspconfig.h
new file mode 100644
index 00000000..c1886146
--- /dev/null
+++ b/plugins/gtkui/dspconfig.h
@@ -0,0 +1,29 @@
+/*
+ DeaDBeeF - ultimate music player for GNU/Linux systems with X11
+ Copyright (C) 2009-2010 Alexey Yakovenko <waker@users.sourceforge.net>
+
+ 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 __DSPCONFIG_H
+#define __DSPCONFIG_H
+
+void
+dsp_setup_init (GtkWidget *prefwin);
+
+void
+dsp_setup_free (void);
+
+#endif
+
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index b3e5ccf2..29ee3af7 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -2629,6 +2629,21 @@ create_prefwin (void)
g_signal_connect ((gpointer) resume_last_session, "toggled",
G_CALLBACK (on_resume_last_session_toggled),
NULL);
+ g_signal_connect ((gpointer) dsp_add, "clicked",
+ G_CALLBACK (on_dsp_add_clicked),
+ NULL);
+ g_signal_connect ((gpointer) dsp_remove, "clicked",
+ G_CALLBACK (on_dsp_remove_clicked),
+ NULL);
+ g_signal_connect ((gpointer) dsp_configure, "clicked",
+ G_CALLBACK (on_dsp_configure_clicked),
+ NULL);
+ g_signal_connect ((gpointer) dsp_up, "clicked",
+ G_CALLBACK (on_dsp_up_clicked),
+ NULL);
+ g_signal_connect ((gpointer) dsp_down, "clicked",
+ G_CALLBACK (on_dsp_down_clicked),
+ NULL);
g_signal_connect ((gpointer) pref_close_send_to_tray, "clicked",
G_CALLBACK (on_pref_close_send_to_tray_clicked),
NULL);
@@ -3407,3 +3422,69 @@ create_sortbydlg (void)
return sortbydlg;
}
+GtkWidget*
+create_select_dsp_plugin (void)
+{
+ GtkWidget *select_dsp_plugin;
+ GtkWidget *dialog_vbox10;
+ GtkWidget *vbox31;
+ GtkWidget *hbox85;
+ GtkWidget *label113;
+ GtkWidget *plugin;
+ GtkWidget *dialog_action_area9;
+ GtkWidget *cancelbutton7;
+ GtkWidget *okbutton7;
+
+ select_dsp_plugin = gtk_dialog_new ();
+ gtk_window_set_title (GTK_WINDOW (select_dsp_plugin), _("Select DSP Plugin"));
+ gtk_window_set_modal (GTK_WINDOW (select_dsp_plugin), TRUE);
+ gtk_window_set_type_hint (GTK_WINDOW (select_dsp_plugin), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+ dialog_vbox10 = GTK_DIALOG (select_dsp_plugin)->vbox;
+ gtk_widget_show (dialog_vbox10);
+
+ vbox31 = gtk_vbox_new (FALSE, 8);
+ gtk_widget_show (vbox31);
+ gtk_box_pack_start (GTK_BOX (dialog_vbox10), vbox31, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox31), 12);
+
+ hbox85 = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox85);
+ gtk_box_pack_start (GTK_BOX (vbox31), hbox85, FALSE, FALSE, 0);
+
+ label113 = gtk_label_new (_("Plugin"));
+ gtk_widget_show (label113);
+ gtk_box_pack_start (GTK_BOX (hbox85), label113, FALSE, FALSE, 0);
+
+ plugin = gtk_combo_box_new_text ();
+ gtk_widget_show (plugin);
+ gtk_box_pack_start (GTK_BOX (hbox85), plugin, TRUE, TRUE, 0);
+
+ dialog_action_area9 = GTK_DIALOG (select_dsp_plugin)->action_area;
+ gtk_widget_show (dialog_action_area9);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area9), GTK_BUTTONBOX_END);
+
+ cancelbutton7 = gtk_button_new_from_stock ("gtk-cancel");
+ gtk_widget_show (cancelbutton7);
+ gtk_dialog_add_action_widget (GTK_DIALOG (select_dsp_plugin), cancelbutton7, GTK_RESPONSE_CANCEL);
+ GTK_WIDGET_SET_FLAGS (cancelbutton7, GTK_CAN_DEFAULT);
+
+ okbutton7 = gtk_button_new_from_stock ("gtk-ok");
+ gtk_widget_show (okbutton7);
+ gtk_dialog_add_action_widget (GTK_DIALOG (select_dsp_plugin), okbutton7, GTK_RESPONSE_OK);
+ GTK_WIDGET_SET_FLAGS (okbutton7, GTK_CAN_DEFAULT);
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (select_dsp_plugin, select_dsp_plugin, "select_dsp_plugin");
+ GLADE_HOOKUP_OBJECT_NO_REF (select_dsp_plugin, dialog_vbox10, "dialog_vbox10");
+ GLADE_HOOKUP_OBJECT (select_dsp_plugin, vbox31, "vbox31");
+ GLADE_HOOKUP_OBJECT (select_dsp_plugin, hbox85, "hbox85");
+ GLADE_HOOKUP_OBJECT (select_dsp_plugin, label113, "label113");
+ GLADE_HOOKUP_OBJECT (select_dsp_plugin, plugin, "plugin");
+ GLADE_HOOKUP_OBJECT_NO_REF (select_dsp_plugin, dialog_action_area9, "dialog_action_area9");
+ GLADE_HOOKUP_OBJECT (select_dsp_plugin, cancelbutton7, "cancelbutton7");
+ GLADE_HOOKUP_OBJECT (select_dsp_plugin, okbutton7, "okbutton7");
+
+ return select_dsp_plugin;
+}
+
diff --git a/plugins/gtkui/interface.h b/plugins/gtkui/interface.h
index a195621a..fdd08f3e 100644
--- a/plugins/gtkui/interface.h
+++ b/plugins/gtkui/interface.h
@@ -14,3 +14,4 @@ GtkWidget* create_editplaylistdlg (void);
GtkWidget* create_addlocationdlg (void);
GtkWidget* create_groupbydlg (void);
GtkWidget* create_sortbydlg (void);
+GtkWidget* create_select_dsp_plugin (void);
diff --git a/plugins/gtkui/prefwin.c b/plugins/gtkui/prefwin.c
index 38167165..81b7922a 100644
--- a/plugins/gtkui/prefwin.c
+++ b/plugins/gtkui/prefwin.c
@@ -35,6 +35,7 @@
#include "eq.h"
#include "ddblistview.h"
#include "pluginconf.h"
+#include "dspconfig.h"
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
@@ -494,6 +495,9 @@ on_preferences_activate (GtkMenuItem *menuitem,
// replaygain_scale
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "pref_replaygain_scale")), deadbeef->conf_get_int ("replaygain_scale", 1));
+ // dsp
+ dsp_setup_init (prefwin);
+
// close_send_to_tray
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "pref_close_send_to_tray")), deadbeef->conf_get_int ("close_send_to_tray", 0));
@@ -646,6 +650,7 @@ on_preferences_activate (GtkMenuItem *menuitem,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (prefwin, "wv_write_id3v1")), wv_write_id3v1);
gtk_dialog_run (GTK_DIALOG (prefwin));
+ dsp_setup_free ();
gtk_widget_destroy (prefwin);
deadbeef->conf_save ();
prefwin = NULL;