Mercurial > audlegacy-plugins
changeset 3129:130edf534967
crossfade plugin code cleanups
author | Michal Lipski <tallica@o2.pl> |
---|---|
date | Thu, 07 May 2009 05:05:16 +0200 |
parents | 28610ff7cda6 |
children | 1f93338f564f |
files | src/crossfade/configure.c src/crossfade/interface-2.0.c |
diffstat | 2 files changed, 9 insertions(+), 597 deletions(-) [+] |
line wrap: on
line diff
--- a/src/crossfade/configure.c Wed May 06 18:48:53 2009 -0500 +++ b/src/crossfade/configure.c Thu May 07 05:05:16 2009 +0200 @@ -43,32 +43,6 @@ #include <sys/ioctl.h> #include <sys/stat.h> -#ifdef HAVE_LIBSAMPLERATE -# include <samplerate.h> -#endif - - -/* available rates for resampling */ -gint sample_rates[] = -{ -#if MAX_RATE > 48000 - 192000, - 96000, - 88200, - 64000, -#endif - 48000, - 44100, - 32000, - 22050, - 16000, - 11025, - 8000, - 6000, - 0 -}; - - #define HIDE(name) \ { if ((set_wgt = lookup_widget(config_win, name))) \ gtk_widget_hide(set_wgt); } @@ -151,7 +125,7 @@ return; item = gtk_menu_item_new_with_label(title); - gtk_signal_connect(GTK_OBJECT(item), "activate", (GtkSignalFunc)func, (gpointer) index); + gtk_signal_connect(GTK_OBJECT(item), "activate", (GtkSignalFunc)func, GINT_TO_POINTER(index)); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); @@ -184,24 +158,6 @@ entered = FALSE; } -/*** output method ***********************************************************/ - -/*-- callbacks --------------------------------------------------------------*/ - -static void -resampling_rate_cb(GtkWidget *widget, gint index) -{ - xfg->output_rate = index; -} - -#ifdef HAVE_LIBSAMPLERATE -static void -resampling_quality_cb(GtkWidget *widget, gint index) -{ - xfg->output_quality = index; -} -#endif - /*** plugin output ***********************************************************/ static void config_plugin_cb(GtkWidget *widget, gint index); @@ -237,7 +193,7 @@ } /* create menu item */ - gtk_signal_connect(GTK_OBJECT(item), "activate", (GtkSignalFunc)config_plugin_cb, (gpointer) index++); + gtk_signal_connect(GTK_OBJECT(item), "activate", (GtkSignalFunc)config_plugin_cb, GINT_TO_POINTER(index++)); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); @@ -1002,23 +958,6 @@ if ((widget = lookup_widget(config_win, "config_notebook"))) xfg->page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widget)); - /* output method */ - - /* sample rate */ - - /* output method: builtin OSS */ - if ((widget = lookup_widget(config_win, "output_oss_notebook"))) - xfg->oss_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widget)); - - xfg->oss_buffer_size_ms = GET_SPIN("ossbuf_buffer_spin"); - xfg->oss_preload_size_ms = GET_SPIN("ossbuf_preload_spin"); - - xfg->oss_fragments = GET_SPIN("osshwb_fragments_spin"); - xfg->oss_fragment_size = GET_SPIN("osshwb_fragsize_spin"); - xfg->oss_maxbuf_enable = GET_TOGGLE("osshwb_maxbuf_check"); - - xfg->oss_mixer_use_master = GET_TOGGLE("ossmixer_pcm_check"); - /* output method: plugin */ op_config.throttle_enable = GET_TOGGLE("op_throttle_check"); op_config.max_write_enable = GET_TOGGLE("op_maxblock_check"); @@ -1133,74 +1072,6 @@ if ((widget = lookup_widget(config_win, "config_notebook"))) gtk_notebook_set_page(GTK_NOTEBOOK(widget), config->page); - /* output: method */ - if ((widget = lookup_widget(config_win, "output_notebook"))) - gtk_notebook_set_page(GTK_NOTEBOOK(widget), xfg->output_method); - - /* output: resampling rate */ - if ((widget = lookup_widget(config_win, "resampling_rate_optionmenu"))) - { - GtkWidget *menu = gtk_menu_new(); - GtkWidget *item; - gint index, *rate; - char label[16]; - - for (rate = &sample_rates[0]; *rate; rate++) - { - g_snprintf(label, sizeof(label), "%d Hz", *rate); - item = gtk_menu_item_new_with_label(label); - gtk_signal_connect(GTK_OBJECT(item), "activate", (GtkSignalFunc)resampling_rate_cb, (gpointer)*rate); - gtk_widget_show(item); - gtk_menu_append(GTK_MENU(menu), item); - } - gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu); - - /* find list index for xfg->output_rate */ - for (rate = &sample_rates[0], index = 0; *rate && *rate != xfg->output_rate; rate++, index++); - - /* if the specified rate is not in the list of available rates, select default rate */ - if (!*rate) - { - DEBUG(("[crossfade] plugin_configure: WARNING: invalid output sample rate (%d)!\n", xfg->output_rate)); - DEBUG(("[crossfade] plugin_configure: ... using default of 44100\n")); - for (rate = &sample_rates[0], index = 0; *rate && *rate != 44100; rate++, index++); - } - - /* finally, set the list selection */ - gtk_option_menu_set_history(GTK_OPTION_MENU(widget), index); - } - - /* output: resampling quality (libsamplerate setting) */ -#ifdef HAVE_LIBSAMPLERATE - if ((widget = lookup_widget(config_win, "resampling_quality_optionmenu"))) - { - GtkWidget *menu = gtk_menu_new(); - GtkWidget *item; - - GtkTooltips *tooltips = (GtkTooltips *) gtk_object_get_data(GTK_OBJECT(config_win), "tooltips"); - - int converter_type; - const char *name, *description; - for (converter_type = 0; (name = src_get_name(converter_type)); converter_type++) - { - description = src_get_description(converter_type); - - item = gtk_menu_item_new_with_label(name); - gtk_tooltips_set_tip(tooltips, item, description, NULL); - - gtk_signal_connect(GTK_OBJECT(item), "activate", (GtkSignalFunc)resampling_quality_cb, (gpointer) converter_type); - gtk_widget_show(item); - gtk_menu_append(GTK_MENU(menu), item); - } - - gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu); - gtk_option_menu_set_history(GTK_OPTION_MENU(widget), xfg->output_quality); - } -#else - HIDE("resampling_quality_hbox"); - HIDE("resampling_quality_optionmenu"); -#endif - /* output method: plugin */ xfade_load_plugin_config(xfg->op_config_string, xfg->op_name, &op_config); SET_TOGGLE ("op_throttle_check", op_config.throttle_enable);
--- a/src/crossfade/interface-2.0.c Wed May 06 18:48:53 2009 -0500 +++ b/src/crossfade/interface-2.0.c Thu May 07 05:05:16 2009 +0200 @@ -33,78 +33,7 @@ GtkWidget *config_vbox; GtkWidget *config_notebook; GtkWidget *config_output_page; - GtkWidget *output_options_hbox; - GtkWidget *output_resampling_frame; - GtkWidget *output_resampling_table; - GtkWidget *resampling_rate_optionmenu; - GtkWidget *menu1; - GtkWidget *resampling_rate_optionmenu_dummy; - GtkWidget *resampling_quality_optionmenu; - GtkWidget *menu2; - GtkWidget *resampling_quality_optionmenu_dummy; - GtkWidget *resampling_rate_hbox; - GtkWidget *resampling_rate_label; - GtkWidget *resampling_quality_hbox; - GtkWidget *resampling_quality_label; - GtkWidget *output_resampling_frame_label; - GtkWidget *output_notebook; - GtkWidget *output_oss_page; - GtkWidget *output_oss_notebook; - GtkWidget *oss_device_page; - GtkWidget *oss_adevice_frame; - GtkWidget *oss_adevice_vbox; - GtkWidget *oss_adevice_hbox; - GtkWidget *oss_adevice_optionmenu; - GtkWidget *oss_adevice_optionmenu_menu; - GtkWidget *oss_adevice_optionmenu_dummy; - GtkWidget *oss_adevice_alt_hbox; - GtkWidget *oss_adevice_alt_check; - GtkWidget *oss_adevice_alt_entry; - GtkWidget *label3; - GtkWidget *oss_mdevice_frame; - GtkWidget *oss_mdevice_vbox; - GtkWidget *oss_mdevice_hbox; - GtkWidget *oss_mdevice_optionmenu; - GtkWidget *oss_mdevice_optionmenu_menu; - GtkWidget *oss_mdevice_optionmenu_dummy; - GtkWidget *oss_mdevice_alt_hbox; - GtkWidget *oss_mdevice_alt_check; - GtkWidget *oss_mdevice_alt_entry; - GtkWidget *label4; - GtkWidget *oss_device_label; - GtkWidget *oss_buffer_page; - GtkWidget *oss_buffer_frame; - GtkWidget *oss_buffer_vbox; - GtkWidget *ossbuf_buffer_hbox; - GtkWidget *ossbuf_buffer_label; - GtkObject *ossbuf_buffer_spin_adj; - GtkWidget *ossbuf_buffer_spin; - GtkWidget *ossbuf_preload_hbox; - GtkWidget *ossbuf_preload_label; - GtkObject *ossbuf_preload_spin_adj; - GtkWidget *ossbuf_preload_spin; - GtkWidget *label5; - GtkWidget *oss_hwbuf_frame; - GtkWidget *oss_hwbuf_vbox; - GtkWidget *osshwb_maxbuf_check; - GtkWidget *osshwb_fragments_hbox; - GtkWidget *osshwb_fragments_label; - GtkObject *osshwb_fragments_spin_adj; - GtkWidget *osshwb_fragments_spin; - GtkWidget *osshwb_fragsize_hbox; - GtkWidget *osshwb_fragsize_label; - GtkObject *osshwb_fragsize_spin_adj; - GtkWidget *osshwb_fragsize_spin; - GtkWidget *label6; - GtkWidget *oss_buffer_label; - GtkWidget *oss_mixer_page; - GtkWidget *oss_mixer_frame; - GtkWidget *oss_mixer_vbox; - GtkWidget *ossmixer_pcm_check; - GtkWidget *label7; - GtkWidget *oss_mixer_label; - GtkWidget *output_plugin_label; - GtkWidget *output_plugin_page; + GtkWidget *output_plugin_vbox; GtkWidget *op_plugin_frame; GtkWidget *op_plugin_vbox; GtkWidget *op_plugin_optionmenu; @@ -123,9 +52,7 @@ GtkWidget *op_maxblock_spin; GtkWidget *op_forcereopen_check; GtkWidget *label9; - GtkWidget *output_oss_label; GtkWidget *empty_notebook_page; - GtkWidget *output_null_label; GtkWidget *output_help_label; GtkWidget *config_devices_label; GtkWidget *config_crossfader_page; @@ -378,318 +305,13 @@ gtk_container_add (GTK_CONTAINER (config_notebook), config_output_page); gtk_container_set_border_width (GTK_CONTAINER (config_output_page), 5); - output_options_hbox = gtk_hbox_new (FALSE, 6); - gtk_widget_show (output_options_hbox); - gtk_box_pack_start (GTK_BOX (config_output_page), output_options_hbox, FALSE, TRUE, 0); - - output_resampling_frame = gtk_frame_new (NULL); - gtk_widget_show (output_resampling_frame); - gtk_box_pack_start (GTK_BOX (output_options_hbox), output_resampling_frame, FALSE, FALSE, 0); - - output_resampling_table = gtk_table_new (2, 2, FALSE); - gtk_widget_show (output_resampling_table); - gtk_container_add (GTK_CONTAINER (output_resampling_frame), output_resampling_table); - gtk_container_set_border_width (GTK_CONTAINER (output_resampling_table), 5); - gtk_table_set_row_spacings (GTK_TABLE (output_resampling_table), 2); - gtk_table_set_col_spacings (GTK_TABLE (output_resampling_table), 2); - - resampling_rate_optionmenu = gtk_option_menu_new (); - gtk_widget_show (resampling_rate_optionmenu); - gtk_table_attach (GTK_TABLE (output_resampling_table), resampling_rate_optionmenu, 1, 2, 0, 1, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_tooltips_set_tip (tooltips, resampling_rate_optionmenu, "Set sampling rate for mixing buffer.\nDefault: 44100", NULL); - - menu1 = gtk_menu_new (); - - resampling_rate_optionmenu_dummy = gtk_menu_item_new_with_mnemonic ("dummy"); - gtk_widget_show (resampling_rate_optionmenu_dummy); - gtk_container_add (GTK_CONTAINER (menu1), resampling_rate_optionmenu_dummy); - - gtk_option_menu_set_menu (GTK_OPTION_MENU (resampling_rate_optionmenu), menu1); - - resampling_quality_optionmenu = gtk_option_menu_new (); - gtk_widget_show (resampling_quality_optionmenu); - gtk_table_attach (GTK_TABLE (output_resampling_table), resampling_quality_optionmenu, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_tooltips_set_tip (tooltips, resampling_quality_optionmenu, "Set resampling algorithm.", NULL); - - menu2 = gtk_menu_new (); - - resampling_quality_optionmenu_dummy = gtk_menu_item_new_with_mnemonic ("dummy"); - gtk_widget_show (resampling_quality_optionmenu_dummy); - gtk_container_add (GTK_CONTAINER (menu2), resampling_quality_optionmenu_dummy); - - gtk_option_menu_set_menu (GTK_OPTION_MENU (resampling_quality_optionmenu), menu2); - - resampling_rate_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_show (resampling_rate_hbox); - gtk_table_attach (GTK_TABLE (output_resampling_table), resampling_rate_hbox, 0, 1, 0, 1, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_FILL), 0, 0); - - resampling_rate_label = gtk_label_new ("Rate:"); - gtk_widget_show (resampling_rate_label); - gtk_box_pack_end (GTK_BOX (resampling_rate_hbox), resampling_rate_label, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (resampling_rate_label), GTK_JUSTIFY_CENTER); - - resampling_quality_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_show (resampling_quality_hbox); - gtk_table_attach (GTK_TABLE (output_resampling_table), resampling_quality_hbox, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_FILL), 0, 0); - - resampling_quality_label = gtk_label_new ("Quality:"); - gtk_widget_show (resampling_quality_label); - gtk_box_pack_end (GTK_BOX (resampling_quality_hbox), resampling_quality_label, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (resampling_quality_label), GTK_JUSTIFY_CENTER); - - output_resampling_frame_label = gtk_label_new ("Resampling"); - gtk_widget_show (output_resampling_frame_label); - gtk_frame_set_label_widget (GTK_FRAME (output_resampling_frame), output_resampling_frame_label); - - output_notebook = gtk_notebook_new (); - gtk_widget_show (output_notebook); - gtk_box_pack_start (GTK_BOX (config_output_page), output_notebook, FALSE, TRUE, 0); - GTK_WIDGET_UNSET_FLAGS (output_notebook, GTK_CAN_FOCUS); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (output_notebook), FALSE); - gtk_notebook_set_show_border (GTK_NOTEBOOK (output_notebook), FALSE); - - output_oss_page = gtk_vbox_new (FALSE, 5); - gtk_widget_show (output_oss_page); - gtk_container_add (GTK_CONTAINER (output_notebook), output_oss_page); - - output_oss_notebook = gtk_notebook_new (); - gtk_widget_show (output_oss_notebook); - gtk_box_pack_start (GTK_BOX (output_oss_page), output_oss_notebook, FALSE, FALSE, 0); - - oss_device_page = gtk_vbox_new (FALSE, 5); - gtk_widget_show (oss_device_page); - gtk_container_add (GTK_CONTAINER (output_oss_notebook), oss_device_page); - gtk_container_set_border_width (GTK_CONTAINER (oss_device_page), 5); - - oss_adevice_frame = gtk_frame_new (NULL); - gtk_widget_show (oss_adevice_frame); - gtk_box_pack_start (GTK_BOX (oss_device_page), oss_adevice_frame, FALSE, FALSE, 0); - - oss_adevice_vbox = gtk_vbox_new (FALSE, 2); - gtk_widget_show (oss_adevice_vbox); - gtk_container_add (GTK_CONTAINER (oss_adevice_frame), oss_adevice_vbox); - gtk_container_set_border_width (GTK_CONTAINER (oss_adevice_vbox), 5); - - oss_adevice_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_show (oss_adevice_hbox); - gtk_box_pack_start (GTK_BOX (oss_adevice_vbox), oss_adevice_hbox, TRUE, TRUE, 0); - - oss_adevice_optionmenu = gtk_option_menu_new (); - gtk_widget_show (oss_adevice_optionmenu); - gtk_box_pack_start (GTK_BOX (oss_adevice_hbox), oss_adevice_optionmenu, TRUE, TRUE, 0); - - oss_adevice_optionmenu_menu = gtk_menu_new (); - - oss_adevice_optionmenu_dummy = gtk_menu_item_new_with_mnemonic ("dummy"); - gtk_widget_show (oss_adevice_optionmenu_dummy); - gtk_container_add (GTK_CONTAINER (oss_adevice_optionmenu_menu), oss_adevice_optionmenu_dummy); - - gtk_option_menu_set_menu (GTK_OPTION_MENU (oss_adevice_optionmenu), oss_adevice_optionmenu_menu); - - oss_adevice_alt_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_show (oss_adevice_alt_hbox); - gtk_box_pack_start (GTK_BOX (oss_adevice_vbox), oss_adevice_alt_hbox, TRUE, TRUE, 0); - - oss_adevice_alt_check = gtk_check_button_new_with_mnemonic ("Use alternate device:"); - gtk_widget_show (oss_adevice_alt_check); - gtk_box_pack_start (GTK_BOX (oss_adevice_alt_hbox), oss_adevice_alt_check, FALSE, FALSE, 0); - - oss_adevice_alt_entry = gtk_entry_new (); - gtk_widget_show (oss_adevice_alt_entry); - gtk_box_pack_start (GTK_BOX (oss_adevice_alt_hbox), oss_adevice_alt_entry, TRUE, TRUE, 0); - - label3 = gtk_label_new ("Audio device"); - gtk_widget_show (label3); - gtk_frame_set_label_widget (GTK_FRAME (oss_adevice_frame), label3); - - oss_mdevice_frame = gtk_frame_new (NULL); - gtk_widget_show (oss_mdevice_frame); - gtk_box_pack_start (GTK_BOX (oss_device_page), oss_mdevice_frame, FALSE, FALSE, 0); - - oss_mdevice_vbox = gtk_vbox_new (FALSE, 2); - gtk_widget_show (oss_mdevice_vbox); - gtk_container_add (GTK_CONTAINER (oss_mdevice_frame), oss_mdevice_vbox); - gtk_container_set_border_width (GTK_CONTAINER (oss_mdevice_vbox), 5); - - oss_mdevice_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_show (oss_mdevice_hbox); - gtk_box_pack_start (GTK_BOX (oss_mdevice_vbox), oss_mdevice_hbox, TRUE, TRUE, 0); - - oss_mdevice_optionmenu = gtk_option_menu_new (); - gtk_widget_show (oss_mdevice_optionmenu); - gtk_box_pack_start (GTK_BOX (oss_mdevice_hbox), oss_mdevice_optionmenu, TRUE, TRUE, 0); - - oss_mdevice_optionmenu_menu = gtk_menu_new (); - - oss_mdevice_optionmenu_dummy = gtk_menu_item_new_with_mnemonic ("dummy"); - gtk_widget_show (oss_mdevice_optionmenu_dummy); - gtk_container_add (GTK_CONTAINER (oss_mdevice_optionmenu_menu), oss_mdevice_optionmenu_dummy); - - gtk_option_menu_set_menu (GTK_OPTION_MENU (oss_mdevice_optionmenu), oss_mdevice_optionmenu_menu); - - oss_mdevice_alt_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_show (oss_mdevice_alt_hbox); - gtk_box_pack_start (GTK_BOX (oss_mdevice_vbox), oss_mdevice_alt_hbox, FALSE, FALSE, 0); - - oss_mdevice_alt_check = gtk_check_button_new_with_mnemonic ("Use alternate device:"); - gtk_widget_show (oss_mdevice_alt_check); - gtk_box_pack_start (GTK_BOX (oss_mdevice_alt_hbox), oss_mdevice_alt_check, FALSE, FALSE, 0); - - oss_mdevice_alt_entry = gtk_entry_new (); - gtk_widget_show (oss_mdevice_alt_entry); - gtk_box_pack_start (GTK_BOX (oss_mdevice_alt_hbox), oss_mdevice_alt_entry, TRUE, TRUE, 0); - - label4 = gtk_label_new ("Mixer device"); - gtk_widget_show (label4); - gtk_frame_set_label_widget (GTK_FRAME (oss_mdevice_frame), label4); - - oss_device_label = gtk_label_new ("Device"); - gtk_widget_show (oss_device_label); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (output_oss_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (output_oss_notebook), 0), oss_device_label); - gtk_label_set_justify (GTK_LABEL (oss_device_label), GTK_JUSTIFY_CENTER); - - oss_buffer_page = gtk_vbox_new (FALSE, 5); - gtk_widget_show (oss_buffer_page); - gtk_container_add (GTK_CONTAINER (output_oss_notebook), oss_buffer_page); - gtk_container_set_border_width (GTK_CONTAINER (oss_buffer_page), 5); - - oss_buffer_frame = gtk_frame_new (NULL); - gtk_widget_show (oss_buffer_frame); - gtk_box_pack_start (GTK_BOX (oss_buffer_page), oss_buffer_frame, FALSE, FALSE, 0); - - oss_buffer_vbox = gtk_vbox_new (FALSE, 2); - gtk_widget_show (oss_buffer_vbox); - gtk_container_add (GTK_CONTAINER (oss_buffer_frame), oss_buffer_vbox); - gtk_container_set_border_width (GTK_CONTAINER (oss_buffer_vbox), 5); - - ossbuf_buffer_hbox = gtk_hbox_new (FALSE, 5); - gtk_widget_show (ossbuf_buffer_hbox); - gtk_box_pack_start (GTK_BOX (oss_buffer_vbox), ossbuf_buffer_hbox, FALSE, FALSE, 0); - - ossbuf_buffer_label = gtk_label_new ("Buffer size (ms):"); - gtk_widget_show (ossbuf_buffer_label); - gtk_box_pack_start (GTK_BOX (ossbuf_buffer_hbox), ossbuf_buffer_label, FALSE, FALSE, 0); - - ossbuf_buffer_spin_adj = gtk_adjustment_new (0, 0, 60000, 10, 100, 10); - ossbuf_buffer_spin = gtk_spin_button_new (GTK_ADJUSTMENT (ossbuf_buffer_spin_adj), 0, 0); - gtk_widget_show (ossbuf_buffer_spin); - gtk_box_pack_start (GTK_BOX (ossbuf_buffer_hbox), ossbuf_buffer_spin, TRUE, TRUE, 0); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ossbuf_buffer_spin), TRUE); - - ossbuf_preload_hbox = gtk_hbox_new (FALSE, 5); - gtk_widget_show (ossbuf_preload_hbox); - gtk_box_pack_start (GTK_BOX (oss_buffer_vbox), ossbuf_preload_hbox, TRUE, TRUE, 0); - - ossbuf_preload_label = gtk_label_new ("Preload size (ms):"); - gtk_widget_show (ossbuf_preload_label); - gtk_box_pack_start (GTK_BOX (ossbuf_preload_hbox), ossbuf_preload_label, FALSE, FALSE, 0); - - ossbuf_preload_spin_adj = gtk_adjustment_new (1500, 0, 60000, 10, 100, 10); - ossbuf_preload_spin = gtk_spin_button_new (GTK_ADJUSTMENT (ossbuf_preload_spin_adj), 0, 0); - gtk_widget_show (ossbuf_preload_spin); - gtk_box_pack_start (GTK_BOX (ossbuf_preload_hbox), ossbuf_preload_spin, TRUE, TRUE, 0); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ossbuf_preload_spin), TRUE); - - label5 = gtk_label_new ("Software buffer"); - gtk_widget_show (label5); - gtk_frame_set_label_widget (GTK_FRAME (oss_buffer_frame), label5); - - oss_hwbuf_frame = gtk_frame_new (NULL); - gtk_widget_show (oss_hwbuf_frame); - gtk_box_pack_start (GTK_BOX (oss_buffer_page), oss_hwbuf_frame, TRUE, TRUE, 0); - - oss_hwbuf_vbox = gtk_vbox_new (FALSE, 2); - gtk_widget_show (oss_hwbuf_vbox); - gtk_container_add (GTK_CONTAINER (oss_hwbuf_frame), oss_hwbuf_vbox); - gtk_container_set_border_width (GTK_CONTAINER (oss_hwbuf_vbox), 5); - - osshwb_maxbuf_check = gtk_check_button_new_with_mnemonic ("Maximum device buffer size"); - gtk_widget_show (osshwb_maxbuf_check); - gtk_box_pack_start (GTK_BOX (oss_hwbuf_vbox), osshwb_maxbuf_check, FALSE, FALSE, 0); - - osshwb_fragments_hbox = gtk_hbox_new (FALSE, 5); - gtk_widget_show (osshwb_fragments_hbox); - gtk_box_pack_start (GTK_BOX (oss_hwbuf_vbox), osshwb_fragments_hbox, FALSE, FALSE, 0); - - osshwb_fragments_label = gtk_label_new ("Number of Fragments:"); - gtk_widget_show (osshwb_fragments_label); - gtk_box_pack_start (GTK_BOX (osshwb_fragments_hbox), osshwb_fragments_label, FALSE, FALSE, 0); - - osshwb_fragments_spin_adj = gtk_adjustment_new (50, 2, 65535, 1, 10, 10); - osshwb_fragments_spin = gtk_spin_button_new (GTK_ADJUSTMENT (osshwb_fragments_spin_adj), 0, 0); - gtk_widget_show (osshwb_fragments_spin); - gtk_box_pack_start (GTK_BOX (osshwb_fragments_hbox), osshwb_fragments_spin, TRUE, TRUE, 0); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (osshwb_fragments_spin), TRUE); - - osshwb_fragsize_hbox = gtk_hbox_new (FALSE, 5); - gtk_widget_show (osshwb_fragsize_hbox); - gtk_box_pack_start (GTK_BOX (oss_hwbuf_vbox), osshwb_fragsize_hbox, TRUE, TRUE, 0); - - osshwb_fragsize_label = gtk_label_new ("Fragment size (2^x bytes):"); - gtk_widget_show (osshwb_fragsize_label); - gtk_box_pack_start (GTK_BOX (osshwb_fragsize_hbox), osshwb_fragsize_label, FALSE, FALSE, 0); - - osshwb_fragsize_spin_adj = gtk_adjustment_new (11, 4, 16, 1, 10, 10); - osshwb_fragsize_spin = gtk_spin_button_new (GTK_ADJUSTMENT (osshwb_fragsize_spin_adj), 0, 0); - gtk_widget_show (osshwb_fragsize_spin); - gtk_box_pack_start (GTK_BOX (osshwb_fragsize_hbox), osshwb_fragsize_spin, TRUE, TRUE, 0); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (osshwb_fragsize_spin), TRUE); - - label6 = gtk_label_new ("Hardware device buffer"); - gtk_widget_show (label6); - gtk_frame_set_label_widget (GTK_FRAME (oss_hwbuf_frame), label6); - - oss_buffer_label = gtk_label_new ("Buffer"); - gtk_widget_show (oss_buffer_label); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (output_oss_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (output_oss_notebook), 1), oss_buffer_label); - gtk_label_set_justify (GTK_LABEL (oss_buffer_label), GTK_JUSTIFY_CENTER); - - oss_mixer_page = gtk_vbox_new (FALSE, 5); - gtk_widget_show (oss_mixer_page); - gtk_container_add (GTK_CONTAINER (output_oss_notebook), oss_mixer_page); - gtk_container_set_border_width (GTK_CONTAINER (oss_mixer_page), 5); - - oss_mixer_frame = gtk_frame_new (NULL); - gtk_widget_show (oss_mixer_frame); - gtk_box_pack_start (GTK_BOX (oss_mixer_page), oss_mixer_frame, FALSE, FALSE, 0); - - oss_mixer_vbox = gtk_vbox_new (FALSE, 2); - gtk_widget_show (oss_mixer_vbox); - gtk_container_add (GTK_CONTAINER (oss_mixer_frame), oss_mixer_vbox); - gtk_container_set_border_width (GTK_CONTAINER (oss_mixer_vbox), 5); - - ossmixer_pcm_check = gtk_check_button_new_with_mnemonic ("Volume controls Master not PCM"); - gtk_widget_show (ossmixer_pcm_check); - gtk_box_pack_start (GTK_BOX (oss_mixer_vbox), ossmixer_pcm_check, FALSE, FALSE, 0); - - label7 = gtk_label_new ("Mixer options"); - gtk_widget_show (label7); - gtk_frame_set_label_widget (GTK_FRAME (oss_mixer_frame), label7); - - oss_mixer_label = gtk_label_new ("Mixer"); - gtk_widget_show (oss_mixer_label); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (output_oss_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (output_oss_notebook), 2), oss_mixer_label); - gtk_label_set_justify (GTK_LABEL (oss_mixer_label), GTK_JUSTIFY_CENTER); - - output_plugin_label = gtk_label_new ("plugin"); - gtk_widget_show (output_plugin_label); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (output_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (output_notebook), 0), output_plugin_label); - - output_plugin_page = gtk_vbox_new (FALSE, 5); - gtk_widget_show (output_plugin_page); - gtk_container_add (GTK_CONTAINER (output_notebook), output_plugin_page); + output_plugin_vbox = gtk_vbox_new (FALSE, 5); + gtk_widget_show (output_plugin_vbox); + gtk_container_add (GTK_CONTAINER (config_output_page), output_plugin_vbox); op_plugin_frame = gtk_frame_new (NULL); gtk_widget_show (op_plugin_frame); - gtk_box_pack_start (GTK_BOX (output_plugin_page), op_plugin_frame, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (output_plugin_vbox), op_plugin_frame, FALSE, TRUE, 0); op_plugin_vbox = gtk_vbox_new (FALSE, 2); gtk_widget_show (op_plugin_vbox); @@ -730,7 +352,7 @@ op_options_frame = gtk_frame_new (NULL); gtk_widget_show (op_options_frame); - gtk_box_pack_start (GTK_BOX (output_plugin_page), op_options_frame, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (output_plugin_vbox), op_options_frame, FALSE, TRUE, 0); op_options_vbox = gtk_vbox_new (FALSE, 2); gtk_widget_show (op_options_vbox); @@ -764,18 +386,6 @@ gtk_widget_show (label9); gtk_frame_set_label_widget (GTK_FRAME (op_options_frame), label9); - output_oss_label = gtk_label_new ("oss"); - gtk_widget_show (output_oss_label); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (output_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (output_notebook), 1), output_oss_label); - - empty_notebook_page = gtk_vbox_new (FALSE, 0); - gtk_widget_show (empty_notebook_page); - gtk_container_add (GTK_CONTAINER (output_notebook), empty_notebook_page); - - output_null_label = gtk_label_new ("null"); - gtk_widget_show (output_null_label); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (output_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (output_notebook), 2), output_null_label); - output_help_label = gtk_label_new ("When modifying the Output Options or the Mixing buffer size, you need to stop/restart playback for the settings to take effect."); gtk_widget_show (output_help_label); gtk_box_pack_start (GTK_BOX (config_output_page), output_help_label, TRUE, TRUE, 0); @@ -2066,74 +1676,7 @@ GLADE_HOOKUP_OBJECT (config_win, config_vbox, "config_vbox"); GLADE_HOOKUP_OBJECT (config_win, config_notebook, "config_notebook"); GLADE_HOOKUP_OBJECT (config_win, config_output_page, "config_output_page"); - GLADE_HOOKUP_OBJECT (config_win, output_options_hbox, "output_options_hbox"); - GLADE_HOOKUP_OBJECT (config_win, output_resampling_frame, "output_resampling_frame"); - GLADE_HOOKUP_OBJECT (config_win, output_resampling_table, "output_resampling_table"); - GLADE_HOOKUP_OBJECT (config_win, resampling_rate_optionmenu, "resampling_rate_optionmenu"); - GLADE_HOOKUP_OBJECT (config_win, menu1, "menu1"); - GLADE_HOOKUP_OBJECT (config_win, resampling_rate_optionmenu_dummy, "resampling_rate_optionmenu_dummy"); - GLADE_HOOKUP_OBJECT (config_win, resampling_quality_optionmenu, "resampling_quality_optionmenu"); - GLADE_HOOKUP_OBJECT (config_win, menu2, "menu2"); - GLADE_HOOKUP_OBJECT (config_win, resampling_quality_optionmenu_dummy, "resampling_quality_optionmenu_dummy"); - GLADE_HOOKUP_OBJECT (config_win, resampling_rate_hbox, "resampling_rate_hbox"); - GLADE_HOOKUP_OBJECT (config_win, resampling_rate_label, "resampling_rate_label"); - GLADE_HOOKUP_OBJECT (config_win, resampling_quality_hbox, "resampling_quality_hbox"); - GLADE_HOOKUP_OBJECT (config_win, resampling_quality_label, "resampling_quality_label"); - GLADE_HOOKUP_OBJECT (config_win, output_resampling_frame_label, "output_resampling_frame_label"); - GLADE_HOOKUP_OBJECT (config_win, output_notebook, "output_notebook"); - GLADE_HOOKUP_OBJECT (config_win, output_oss_page, "output_oss_page"); - GLADE_HOOKUP_OBJECT (config_win, output_oss_notebook, "output_oss_notebook"); - GLADE_HOOKUP_OBJECT (config_win, oss_device_page, "oss_device_page"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_frame, "oss_adevice_frame"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_vbox, "oss_adevice_vbox"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_hbox, "oss_adevice_hbox"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_optionmenu, "oss_adevice_optionmenu"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_optionmenu_menu, "oss_adevice_optionmenu_menu"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_optionmenu_dummy, "oss_adevice_optionmenu_dummy"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_alt_hbox, "oss_adevice_alt_hbox"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_alt_check, "oss_adevice_alt_check"); - GLADE_HOOKUP_OBJECT (config_win, oss_adevice_alt_entry, "oss_adevice_alt_entry"); - GLADE_HOOKUP_OBJECT (config_win, label3, "label3"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_frame, "oss_mdevice_frame"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_vbox, "oss_mdevice_vbox"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_hbox, "oss_mdevice_hbox"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_optionmenu, "oss_mdevice_optionmenu"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_optionmenu_menu, "oss_mdevice_optionmenu_menu"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_optionmenu_dummy, "oss_mdevice_optionmenu_dummy"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_alt_hbox, "oss_mdevice_alt_hbox"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_alt_check, "oss_mdevice_alt_check"); - GLADE_HOOKUP_OBJECT (config_win, oss_mdevice_alt_entry, "oss_mdevice_alt_entry"); - GLADE_HOOKUP_OBJECT (config_win, label4, "label4"); - GLADE_HOOKUP_OBJECT (config_win, oss_device_label, "oss_device_label"); - GLADE_HOOKUP_OBJECT (config_win, oss_buffer_page, "oss_buffer_page"); - GLADE_HOOKUP_OBJECT (config_win, oss_buffer_frame, "oss_buffer_frame"); - GLADE_HOOKUP_OBJECT (config_win, oss_buffer_vbox, "oss_buffer_vbox"); - GLADE_HOOKUP_OBJECT (config_win, ossbuf_buffer_hbox, "ossbuf_buffer_hbox"); - GLADE_HOOKUP_OBJECT (config_win, ossbuf_buffer_label, "ossbuf_buffer_label"); - GLADE_HOOKUP_OBJECT (config_win, ossbuf_buffer_spin, "ossbuf_buffer_spin"); - GLADE_HOOKUP_OBJECT (config_win, ossbuf_preload_hbox, "ossbuf_preload_hbox"); - GLADE_HOOKUP_OBJECT (config_win, ossbuf_preload_label, "ossbuf_preload_label"); - GLADE_HOOKUP_OBJECT (config_win, ossbuf_preload_spin, "ossbuf_preload_spin"); - GLADE_HOOKUP_OBJECT (config_win, label5, "label5"); - GLADE_HOOKUP_OBJECT (config_win, oss_hwbuf_frame, "oss_hwbuf_frame"); - GLADE_HOOKUP_OBJECT (config_win, oss_hwbuf_vbox, "oss_hwbuf_vbox"); - GLADE_HOOKUP_OBJECT (config_win, osshwb_maxbuf_check, "osshwb_maxbuf_check"); - GLADE_HOOKUP_OBJECT (config_win, osshwb_fragments_hbox, "osshwb_fragments_hbox"); - GLADE_HOOKUP_OBJECT (config_win, osshwb_fragments_label, "osshwb_fragments_label"); - GLADE_HOOKUP_OBJECT (config_win, osshwb_fragments_spin, "osshwb_fragments_spin"); - GLADE_HOOKUP_OBJECT (config_win, osshwb_fragsize_hbox, "osshwb_fragsize_hbox"); - GLADE_HOOKUP_OBJECT (config_win, osshwb_fragsize_label, "osshwb_fragsize_label"); - GLADE_HOOKUP_OBJECT (config_win, osshwb_fragsize_spin, "osshwb_fragsize_spin"); - GLADE_HOOKUP_OBJECT (config_win, label6, "label6"); - GLADE_HOOKUP_OBJECT (config_win, oss_buffer_label, "oss_buffer_label"); - GLADE_HOOKUP_OBJECT (config_win, oss_mixer_page, "oss_mixer_page"); - GLADE_HOOKUP_OBJECT (config_win, oss_mixer_frame, "oss_mixer_frame"); - GLADE_HOOKUP_OBJECT (config_win, oss_mixer_vbox, "oss_mixer_vbox"); - GLADE_HOOKUP_OBJECT (config_win, ossmixer_pcm_check, "ossmixer_pcm_check"); - GLADE_HOOKUP_OBJECT (config_win, label7, "label7"); - GLADE_HOOKUP_OBJECT (config_win, oss_mixer_label, "oss_mixer_label"); - GLADE_HOOKUP_OBJECT (config_win, output_plugin_label, "output_plugin_label"); - GLADE_HOOKUP_OBJECT (config_win, output_plugin_page, "output_plugin_page"); + GLADE_HOOKUP_OBJECT (config_win, output_plugin_vbox, "output_plugin_vbox"); GLADE_HOOKUP_OBJECT (config_win, op_plugin_frame, "op_plugin_frame"); GLADE_HOOKUP_OBJECT (config_win, op_plugin_vbox, "op_plugin_vbox"); GLADE_HOOKUP_OBJECT (config_win, op_plugin_optionmenu, "op_plugin_optionmenu"); @@ -2151,8 +1694,6 @@ GLADE_HOOKUP_OBJECT (config_win, op_maxblock_spin, "op_maxblock_spin"); GLADE_HOOKUP_OBJECT (config_win, op_forcereopen_check, "op_forcereopen_check"); GLADE_HOOKUP_OBJECT (config_win, label9, "label9"); - GLADE_HOOKUP_OBJECT (config_win, output_oss_label, "output_oss_label"); - GLADE_HOOKUP_OBJECT (config_win, output_null_label, "output_null_label"); GLADE_HOOKUP_OBJECT (config_win, output_help_label, "output_help_label"); GLADE_HOOKUP_OBJECT (config_win, config_devices_label, "config_devices_label"); GLADE_HOOKUP_OBJECT (config_win, config_crossfader_page, "config_crossfader_page");