summaryrefslogtreecommitdiff
path: root/plugins/gtkui/eq.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-11 18:38:49 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-11 18:38:49 +0200
commit04e43b626b95a664d40d1c6a7c16eb7504f584b5 (patch)
tree7d5aacb9ccdf0bdc8733f7bc111c784986cf0576 /plugins/gtkui/eq.c
parent7e81080754e471c05b6943b0d717574078bd12ce (diff)
hide EQ gtk gui if supereq plugin is not available
Diffstat (limited to 'plugins/gtkui/eq.c')
-rw-r--r--plugins/gtkui/eq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/gtkui/eq.c b/plugins/gtkui/eq.c
index f558d8c7..494333e0 100644
--- a/plugins/gtkui/eq.c
+++ b/plugins/gtkui/eq.c
@@ -40,7 +40,7 @@ amp_to_db (float amp) {
return 20*log10 (amp);
}
-static DB_supereq_dsp_t *
+DB_supereq_dsp_t *
get_supereq_plugin (void) {
DB_dsp_t **plugs = deadbeef->plug_get_dsp_list ();
for (int i = 0; plugs[i]; i++) {
@@ -273,6 +273,10 @@ on_import_fb2k_preset_clicked (GtkButton *button,
void
eq_window_show (void) {
+ DB_supereq_dsp_t *eq = get_supereq_plugin ();
+ if (!eq) {
+ return;
+ }
if (!eqcont) {
eqcont = gtk_vbox_new (FALSE, 8);
GtkWidget *parent= lookup_widget (mainwin, "plugins_bottom_vbox");
@@ -338,7 +342,6 @@ eq_window_show (void) {
g_signal_connect (eqwin, "on_changed", G_CALLBACK (eq_value_changed), 0);
gtk_widget_set_size_request (eqwin, -1, 200);
- DB_supereq_dsp_t *eq = get_supereq_plugin ();
ddb_equalizer_set_preamp (DDB_EQUALIZER (eqwin), amp_to_db (eq->get_preamp ()));
for (int i = 0; i < 18; i++) {