summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-12-08 22:28:56 +0100
committerGravatar waker <wakeroid@gmail.com>2010-12-08 22:28:56 +0100
commit49917836ac2752fa39255a08a2a1c71872beba5f (patch)
tree5596aabd63a80ad9ff854cc7e21c87f542de6939
parentb6887cf04522f35471ec43e950cd87296b701d85 (diff)
dsp preset editing WIP
-rw-r--r--plugins/dsp_libsrc/src.c2
-rw-r--r--plugins/gtkui/callbacks.h4
-rw-r--r--plugins/gtkui/converter.c281
-rw-r--r--plugins/gtkui/converter.h9
-rw-r--r--plugins/gtkui/deadbeef.glade64
-rw-r--r--plugins/gtkui/interface.c27
6 files changed, 274 insertions, 113 deletions
diff --git a/plugins/dsp_libsrc/src.c b/plugins/dsp_libsrc/src.c
index de73ca57..26a9ba7f 100644
--- a/plugins/dsp_libsrc/src.c
+++ b/plugins/dsp_libsrc/src.c
@@ -254,7 +254,7 @@ static DB_dsp_t plugin = {
.plugin.version_minor = 1,
.plugin.type = DB_PLUGIN_DSP,
.plugin.id = "SRC",
- .plugin.name = "Secret Rabbit Code",
+ .plugin.name = "Resampler (Secret Rabbit Code)",
.plugin.descr = "Samplerate converter using libsamplerate",
.plugin.author = "Alexey Yakovenko",
.plugin.email = "waker@users.sf.net",
diff --git a/plugins/gtkui/callbacks.h b/plugins/gtkui/callbacks.h
index 78234f01..3d6872bf 100644
--- a/plugins/gtkui/callbacks.h
+++ b/plugins/gtkui/callbacks.h
@@ -1069,3 +1069,7 @@ on_dsp_preset_add_plugin_clicked (GtkButton *button,
void
on_dsp_preset_remove_plugin_clicked (GtkButton *button,
gpointer user_data);
+
+void
+on_converter_dsp_preset_changed (GtkComboBox *combobox,
+ gpointer user_data);
diff --git a/plugins/gtkui/converter.c b/plugins/gtkui/converter.c
index 37899db7..b8a21a52 100644
--- a/plugins/gtkui/converter.c
+++ b/plugins/gtkui/converter.c
@@ -159,13 +159,126 @@ ddb_dsp_preset_free (ddb_dsp_preset_t *p) {
if (p->title) {
free (p->title);
}
+ while (p->chain) {
+ DB_dsp_instance_t *next = p->chain->next;
+ p->chain->plugin->close (p->chain);
+ p->chain = next;
+ }
free (p);
}
}
+void
+ddb_dsp_preset_copy (ddb_dsp_preset_t *to, ddb_dsp_preset_t *from) {
+ to->title = strdup (from->title);
+ DB_dsp_instance_t *tail = NULL;
+ DB_dsp_instance_t *dsp = from->chain;
+ while (dsp) {
+ DB_dsp_instance_t *i = dsp->plugin->open ();
+ if (dsp->plugin->num_params) {
+ int n = dsp->plugin->num_params ();
+ for (int j = 0; j < n; j++) {
+ i->plugin->set_param (i, j, dsp->plugin->get_param (dsp, j));
+ }
+ }
+ if (tail) {
+ tail->next = i;
+ tail = i;
+ }
+ else {
+ to->chain = tail = i;
+ }
+ dsp = dsp->next;
+ }
+}
+
ddb_dsp_preset_t *
ddb_dsp_preset_load (const char *fname) {
- return NULL;
+ printf ("loading %s\n", fname);
+ int err = 1;
+ FILE *fp = fopen (fname, "rt");
+ if (!fp) {
+ return NULL;
+ }
+ ddb_dsp_preset_t *p = ddb_dsp_preset_alloc ();
+ if (!p) {
+ goto error;
+ }
+
+ // title
+ char temp[100];
+ if (1 != fscanf (fp, "title %100[^\n]\n", temp)) {
+ goto error;
+ }
+ printf ("title: %s\n", temp);
+ p->title = strdup (temp);
+ DB_dsp_instance_t *tail = NULL;
+
+ for (;;) {
+ // plugin {
+ int err = fscanf (fp, "%100s {\n", temp);
+ if (err == EOF) {
+ break;
+ }
+ else if (1 != err) {
+ fprintf (stderr, "error plugin name\n");
+ goto error;
+ }
+ printf ("plugin id: %s\n", temp);
+
+ DB_dsp_t *plug = (DB_dsp_t *)deadbeef->plug_get_for_id (temp);
+ if (!plug) {
+ fprintf (stderr, "ddb_dsp_preset_load: plugin %s not found. preset will not be loaded\n", temp);
+ goto error;
+ }
+ DB_dsp_instance_t *inst = plug->open ();
+ if (!inst) {
+ fprintf (stderr, "ddb_dsp_preset_load: failed to open instance of plugin %s\n", temp);
+ goto error;
+ }
+
+ if (tail) {
+ tail->next = inst;
+ tail = inst;
+ }
+ else {
+ tail = p->chain = inst;
+ }
+
+ int n = 0;
+ for (;;) {
+ float value;
+ if (!fgets (temp, sizeof (temp), fp)) {
+ fprintf (stderr, "unexpected eof while reading plugin params\n");
+ goto error;
+ }
+ if (!strcmp (temp, "}\n")) {
+ break;
+ }
+ else if (1 != sscanf (temp, "\t%f\n", &value)) {
+ fprintf (stderr, "error loading param %d\n", n);
+ goto error;
+ }
+ if (plug->num_params) {
+ plug->set_param (inst, n, value);
+ }
+ n++;
+ }
+ }
+
+ err = 0;
+error:
+ if (err) {
+ fprintf (stderr, "error loading %s\n", fname);
+ }
+ if (fp) {
+ fclose (fp);
+ }
+ if (err && p) {
+ ddb_dsp_preset_free (p);
+ p = NULL;
+ }
+ return p;
}
int
@@ -207,7 +320,7 @@ ddb_dsp_preset_save (ddb_dsp_preset_t *p, int overwrite) {
int i;
for (i = 0; i < n; i++) {
float v = inst->plugin->get_param (inst, i);
- fprintf (fp, "\t%d %f\n", i, v);
+ fprintf (fp, "\t%f\n", v);
}
}
fprintf (fp, "}\n");
@@ -264,8 +377,8 @@ load_encoder_presets (void) {
static GtkWidget *converter;
void
-fill_encoder_presets (GtkListStore *mdl) {
- ddb_encoder_preset_t *p = encoder_presets;
+fill_presets (GtkListStore *mdl, ddb_preset_t *head) {
+ ddb_preset_t *p = head;
while (p) {
GtkTreeIter iter;
gtk_list_store_append (mdl, &iter);
@@ -274,12 +387,51 @@ fill_encoder_presets (GtkListStore *mdl) {
}
}
+int
+load_dsp_presets (void) {
+ ddb_dsp_preset_t *tail = NULL;
+ char path[1024];
+ if (snprintf (path, sizeof (path), "%s/presets/dsp", deadbeef->get_config_dir ()) < 0) {
+ return -1;
+ }
+ struct dirent **namelist = NULL;
+ int n = scandir (path, &namelist, scandir_preset_filter, dirent_alphasort);
+ int i;
+ for (i = 0; i < n; i++) {
+ char s[1024];
+ if (snprintf (s, sizeof (s), "%s/%s", path, namelist[i]->d_name) > 0){
+ ddb_dsp_preset_t *p = ddb_dsp_preset_load (s);
+ if (p) {
+ if (tail) {
+ tail->next = p;
+ tail = p;
+ }
+ else {
+ dsp_presets = tail = p;
+ }
+ }
+ }
+ free (namelist[i]);
+ }
+ free (namelist);
+
+ // prepend empty preset
+ ddb_dsp_preset_t *p = ddb_dsp_preset_alloc ();
+ p->title = strdup ("Pass through");
+ p->next = dsp_presets;
+ dsp_presets = p;
+ return 0;
+}
+
void
converter_show (void) {
if (!converter) {
if (!encoder_presets) {
load_encoder_presets ();
}
+ if (!dsp_presets) {
+ load_dsp_presets ();
+ }
converter = create_converterdlg ();
gtk_entry_set_text (GTK_ENTRY (lookup_widget (converter, "output_folder")), deadbeef->conf_get_str ("converter.output_folder", ""));
@@ -288,11 +440,13 @@ converter_show (void) {
// fill encoder presets
combo = GTK_COMBO_BOX (lookup_widget (converter, "encoder"));
GtkListStore *mdl = GTK_LIST_STORE (gtk_combo_box_get_model (combo));
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
gtk_combo_box_set_active (combo, deadbeef->conf_get_int ("converter.encoder_preset", 0));
// fill dsp presets
combo = GTK_COMBO_BOX (lookup_widget (converter, "dsp_preset"));
+ mdl = GTK_LIST_STORE (gtk_combo_box_get_model (combo));
+ fill_presets (mdl, (ddb_preset_t *)dsp_presets);
gtk_combo_box_set_active (combo, deadbeef->conf_get_int ("converter.dsp_preset", 0));
// fill channel maps
@@ -317,6 +471,15 @@ on_converter_encoder_changed (GtkComboBox *combobox,
}
void
+on_converter_dsp_preset_changed (GtkComboBox *combobox,
+ gpointer user_data)
+{
+ GtkComboBox *combo = GTK_COMBO_BOX (lookup_widget (converter, "dsp_preset"));
+ int act = gtk_combo_box_get_active (combo);
+ deadbeef->conf_set_int ("converter.dsp_preset", act);
+}
+
+void
on_converter_output_browse_clicked (GtkButton *button,
gpointer user_data)
{
@@ -574,13 +737,13 @@ on_encoder_preset_add (GtkButton *button,
GtkWidget *list = lookup_widget (toplevel, "presets");
GtkListStore *mdl = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (list)));
gtk_list_store_clear (mdl);
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
// presets combo box
GtkComboBox *combo = GTK_COMBO_BOX (lookup_widget (converter, "encoder"));
mdl = GTK_LIST_STORE (gtk_combo_box_get_model (combo));
gtk_list_store_clear (mdl);
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
gtk_combo_box_set_active (combo, deadbeef->conf_get_int ("converter.encoder_preset", 0));
}
@@ -679,13 +842,13 @@ on_encoder_preset_edit (GtkButton *button,
// presets list view
GtkListStore *mdl = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (list)));
gtk_list_store_clear (mdl);
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
// presets combo box
GtkComboBox *combo = GTK_COMBO_BOX (lookup_widget (converter, "encoder"));
mdl = GTK_LIST_STORE (gtk_combo_box_get_model (combo));
gtk_list_store_clear (mdl);
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
gtk_combo_box_set_active (combo, deadbeef->conf_get_int ("converter.encoder_preset", 0));
}
@@ -743,13 +906,13 @@ on_encoder_preset_remove (GtkButton *button,
// presets list view
GtkListStore *mdl = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (list)));
gtk_list_store_clear (mdl);
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
// presets combo box
GtkComboBox *combo = GTK_COMBO_BOX (lookup_widget (converter, "encoder"));
mdl = GTK_LIST_STORE (gtk_combo_box_get_model (combo));
gtk_list_store_clear (mdl);
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
gtk_combo_box_set_active (combo, deadbeef->conf_get_int ("converter.encoder_preset", 0));
}
}
@@ -771,7 +934,7 @@ on_edit_encoder_presets_clicked (GtkButton *button,
gtk_tree_view_append_column (GTK_TREE_VIEW (list), GTK_TREE_VIEW_COLUMN (col));
GtkListStore *mdl = gtk_list_store_new (1, G_TYPE_STRING);
gtk_tree_view_set_model (GTK_TREE_VIEW (list), GTK_TREE_MODEL (mdl));
- fill_encoder_presets (mdl);
+ fill_presets (mdl, (ddb_preset_t *)encoder_presets);
int curr = deadbeef->conf_get_int ("converter.encoder_preset", 0);
GtkTreePath *path = gtk_tree_path_new_from_indices (curr, -1);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, col, FALSE);
@@ -872,18 +1035,18 @@ on_dsp_preset_remove_plugin_clicked (GtkButton *button,
}
+int
+edit_dsp_preset (GtkWidget *toplevel, int overwrite) {
+ int r = GTK_RESPONSE_CANCEL;
-void
-on_dsp_preset_add (GtkButton *button,
- gpointer user_data)
-{
GtkWidget *dlg = create_dsppreset_editor ();
gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_OK);
- GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (toplevel));
gtk_window_set_title (GTK_WINDOW (dlg), _("New DSP Preset"));
- current_dsp_preset = ddb_dsp_preset_alloc ();
+
+ // title
+ gtk_entry_set_text (GTK_ENTRY (lookup_widget (dlg, "title")), current_dsp_preset->title);
{
// left list
@@ -891,8 +1054,10 @@ on_dsp_preset_add (GtkButton *button,
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 (list), GTK_TREE_VIEW_COLUMN (col));
- GtkListStore *mdl = gtk_list_store_new (G_TYPE_STRING);
+ GtkListStore *mdl = gtk_list_store_new (1, G_TYPE_STRING);
gtk_tree_view_set_model (GTK_TREE_VIEW (list), GTK_TREE_MODEL (mdl));
+
+ fill_dsp_preset_chain (mdl);
}
{
@@ -909,14 +1074,14 @@ on_dsp_preset_add (GtkButton *button,
for (;;) {
- int r = gtk_dialog_run (GTK_DIALOG (dlg));
+ r = gtk_dialog_run (GTK_DIALOG (dlg));
if (r == GTK_RESPONSE_OK) {
if (current_dsp_preset->title) {
free (current_dsp_preset->title);
}
current_dsp_preset->title = strdup (gtk_entry_get_text (GTK_ENTRY (lookup_widget (dlg, "title"))));
- int err = ddb_dsp_preset_save (current_dsp_preset, 0);
+ int err = ddb_dsp_preset_save (current_dsp_preset, overwrite);
if (err < 0) {
GtkWidget *warndlg = gtk_message_dialog_new (GTK_WINDOW (mainwin), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Failed to save DSP preset"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (warndlg), err == -1 ? _("Check preset folder permissions, try to pick different title, or free up some disk space") : _("Preset with the same name already exists. Try to pick another title."));
@@ -949,6 +1114,22 @@ on_dsp_preset_add (GtkButton *button,
}
gtk_widget_destroy (dlg);
+ return r;
+}
+
+
+void
+on_dsp_preset_add (GtkButton *button,
+ gpointer user_data)
+{
+
+ current_dsp_preset = ddb_dsp_preset_alloc ();
+
+ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
+
+ edit_dsp_preset (toplevel, 0);
+
+ current_dsp_preset = NULL;
}
void
@@ -961,6 +1142,54 @@ void
on_dsp_preset_edit (GtkButton *button,
gpointer user_data)
{
+ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
+
+ GtkWidget *list = lookup_widget (toplevel, "presets");
+ 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_preset_t *prev = NULL;
+ ddb_dsp_preset_t *p = dsp_presets;
+ while (p && idx > 0) {
+ prev = p;
+ p = p->next;
+ idx--;
+ }
+ if (!p) {
+ return;
+ }
+
+ current_dsp_preset = ddb_dsp_preset_alloc ();
+ ddb_dsp_preset_copy (current_dsp_preset, p);
+
+ int r = edit_dsp_preset (toplevel, 1);
+ if (r == GTK_RESPONSE_OK) {
+ // replace preset
+ if (prev) {
+ prev->next = current_dsp_preset;
+ }
+ else {
+ dsp_presets = current_dsp_preset;
+ }
+ current_dsp_preset->next = p->next;
+ ddb_dsp_preset_free (p);
+ }
+ else {
+ ddb_dsp_preset_free (current_dsp_preset);
+ }
+
+ current_dsp_preset = NULL;
}
void
@@ -980,11 +1209,11 @@ on_edit_dsp_presets_clicked (GtkButton *button,
gtk_tree_view_append_column (GTK_TREE_VIEW (list), GTK_TREE_VIEW_COLUMN (col));
GtkListStore *mdl = gtk_list_store_new (1, G_TYPE_STRING);
gtk_tree_view_set_model (GTK_TREE_VIEW (list), GTK_TREE_MODEL (mdl));
-// fill_dsp_presets (mdl);
-// int curr = deadbeef->conf_get_int ("converter.dsp_preset", 0);
-// GtkTreePath *path = gtk_tree_path_new_from_indices (curr, -1);
-// gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, col, FALSE);
-// gtk_tree_path_free (path);
+ fill_presets (mdl, (ddb_preset_t *)dsp_presets);
+ int curr = deadbeef->conf_get_int ("converter.dsp_preset", 0);
+ GtkTreePath *path = gtk_tree_path_new_from_indices (curr, -1);
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, col, FALSE);
+ gtk_tree_path_free (path);
gtk_dialog_run (GTK_DIALOG (dlg));
gtk_widget_destroy (dlg);
}
diff --git a/plugins/gtkui/converter.h b/plugins/gtkui/converter.h
index d9cb3eed..3cc3e751 100644
--- a/plugins/gtkui/converter.h
+++ b/plugins/gtkui/converter.h
@@ -35,19 +35,24 @@ enum {
DDB_ENCODER_FMT_32BITFLOAT = 0x10,
};
+typedef struct ddb_preset_s {
+ char *title;
+ struct ddb_preset_s *next;
+} ddb_preset_t;
+
typedef struct ddb_encoder_preset_s {
char *title;
+ struct ddb_encoder_preset_s *next;
char *fname;
char *encoder;
int method; // pipe or file
uint32_t formats; // combination of supported flags (FMT_*)
- struct ddb_encoder_preset_s *next;
} ddb_encoder_preset_t;
typedef struct ddb_dsp_preset_s {
char *title;
- DB_dsp_instance_t *chain;
struct ddb_dsp_preset_s *next;
+ DB_dsp_instance_t *chain;
} ddb_dsp_preset_t;
ddb_encoder_preset_t *
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index f48cdad1..e9a2f624 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -6390,9 +6390,10 @@ SOCKS5_HOSTNAME</property>
<child>
<widget class="GtkComboBox" id="dsp_preset">
<property name="visible">True</property>
- <property name="items" translatable="yes">Pass Through</property>
+ <property name="items" translatable="yes"></property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
+ <signal name="changed" handler="on_converter_dsp_preset_changed" last_modification_time="Wed, 08 Dec 2010 21:22:19 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -6482,7 +6483,7 @@ SOCKS5_HOSTNAME</property>
<child>
<widget class="GtkComboBox" id="channelmap">
<property name="visible">True</property>
- <property name="items" translatable="yes">Pass Through</property>
+ <property name="items" translatable="yes"></property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
</widget>
@@ -6828,7 +6829,7 @@ SOCKS5_HOSTNAME</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
- <property name="text" translatable="yes">Untitled Encoder</property>
+ <property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">●</property>
<property name="activates_default">True</property>
@@ -7834,63 +7835,6 @@ Descending</property>
<property name="fill">False</property>
</packing>
</child>
-
- <child>
- <widget class="GtkHBox" id="hbox84">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label112">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Title</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="GtkEntry" id="title">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes">Untitled</property>
- <property name="has_frame">True</property>
- <property name="invisible_char">●</property>
- <property name="activates_default">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>
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index e2517e23..cfae083b 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -3352,7 +3352,6 @@ create_converterdlg (void)
dsp_preset = gtk_combo_box_new_text ();
gtk_widget_show (dsp_preset);
gtk_box_pack_start (GTK_BOX (hbox91), dsp_preset, TRUE, TRUE, 0);
- gtk_combo_box_append_text (GTK_COMBO_BOX (dsp_preset), _("Pass Through"));
edit_dsp_presets = gtk_button_new ();
gtk_widget_show (edit_dsp_presets);
@@ -3377,7 +3376,6 @@ create_converterdlg (void)
channelmap = gtk_combo_box_new_text ();
gtk_widget_show (channelmap);
gtk_box_pack_start (GTK_BOX (hbox92), channelmap, TRUE, TRUE, 0);
- gtk_combo_box_append_text (GTK_COMBO_BOX (channelmap), _("Pass Through"));
edit_channel_maps = gtk_button_new ();
gtk_widget_show (edit_channel_maps);
@@ -3444,6 +3442,9 @@ create_converterdlg (void)
g_signal_connect ((gpointer) edit_encoder_presets, "clicked",
G_CALLBACK (on_edit_encoder_presets_clicked),
NULL);
+ g_signal_connect ((gpointer) dsp_preset, "changed",
+ G_CALLBACK (on_converter_dsp_preset_changed),
+ NULL);
g_signal_connect ((gpointer) edit_dsp_presets, "clicked",
G_CALLBACK (on_edit_dsp_presets_clicked),
NULL);
@@ -3575,7 +3576,6 @@ create_convpreset_editor (void)
fname = gtk_entry_new ();
gtk_widget_show (fname);
gtk_box_pack_start (GTK_BOX (hbox97), fname, TRUE, TRUE, 0);
- gtk_entry_set_text (GTK_ENTRY (fname), _("Untitled Encoder"));
gtk_entry_set_invisible_char (GTK_ENTRY (fname), 9679);
gtk_entry_set_activates_default (GTK_ENTRY (fname), TRUE);
@@ -3988,9 +3988,6 @@ create_select_dsp_plugin (void)
GtkWidget *hbox85;
GtkWidget *label113;
GtkWidget *plugin;
- GtkWidget *hbox84;
- GtkWidget *label112;
- GtkWidget *title;
GtkWidget *dialog_action_area9;
GtkWidget *cancelbutton7;
GtkWidget *okbutton7;
@@ -4020,21 +4017,6 @@ create_select_dsp_plugin (void)
gtk_widget_show (plugin);
gtk_box_pack_start (GTK_BOX (hbox85), plugin, TRUE, TRUE, 0);
- hbox84 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox84);
- gtk_box_pack_start (GTK_BOX (vbox31), hbox84, FALSE, FALSE, 0);
-
- label112 = gtk_label_new (_("Title"));
- gtk_widget_show (label112);
- gtk_box_pack_start (GTK_BOX (hbox84), label112, FALSE, FALSE, 0);
-
- title = gtk_entry_new ();
- gtk_widget_show (title);
- gtk_box_pack_start (GTK_BOX (hbox84), title, TRUE, TRUE, 0);
- gtk_entry_set_text (GTK_ENTRY (title), _("Untitled"));
- gtk_entry_set_invisible_char (GTK_ENTRY (title), 9679);
- gtk_entry_set_activates_default (GTK_ENTRY (title), TRUE);
-
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);
@@ -4056,9 +4038,6 @@ create_select_dsp_plugin (void)
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 (select_dsp_plugin, hbox84, "hbox84");
- GLADE_HOOKUP_OBJECT (select_dsp_plugin, label112, "label112");
- GLADE_HOOKUP_OBJECT (select_dsp_plugin, title, "title");
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");