# HG changeset patch # User chainsaw # Date 1147621103 25200 # Node ID a8e4435f65f2e55eb78280efbd86fad88e885d13 # Parent f866da587845903ba7f8105e772dc61ed7b5e8fa [svn] 48kHz sampling rate selection for ModPlug by Christian Birchinger (Joker) from Gentoo. diff -r f866da587845 -r a8e4435f65f2 Plugins/Input/modplug/gui/callbacks.cpp --- a/Plugins/Input/modplug/gui/callbacks.cpp Sun May 14 01:20:40 2006 -0700 +++ b/Plugins/Input/modplug/gui/callbacks.cpp Sun May 14 08:38:23 2006 -0700 @@ -37,6 +37,8 @@ lProps.mFrequency = 11025; else if (gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "samp22"))) lProps.mFrequency = 22050; + else if (gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "samp48"))) + lProps.mFrequency = 48000; else lProps.mFrequency = 44100; diff -r f866da587845 -r a8e4435f65f2 Plugins/Input/modplug/gui/interface.cpp --- a/Plugins/Input/modplug/gui/interface.cpp Sun May 14 01:20:40 2006 -0700 +++ b/Plugins/Input/modplug/gui/interface.cpp Sun May 14 08:38:23 2006 -0700 @@ -40,6 +40,7 @@ GtkWidget *frame3; GtkWidget *vbox6; GSList *vbox6_group = NULL; + GtkWidget *samp48; GtkWidget *samp44; GtkWidget *samp22; GtkWidget *samp11; @@ -228,6 +229,14 @@ gtk_widget_show (vbox6); gtk_container_add (GTK_CONTAINER (frame3), vbox6); + samp48 = gtk_radio_button_new_with_label (vbox6_group, _("48 kHz")); + vbox6_group = gtk_radio_button_group (GTK_RADIO_BUTTON (samp48)); + gtk_widget_ref (samp48); + gtk_object_set_data_full (GTK_OBJECT (Config), "samp48", samp48, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (samp48); + gtk_box_pack_start (GTK_BOX (vbox6), samp48, FALSE, FALSE, 0); + samp44 = gtk_radio_button_new_with_label (vbox6_group, _("44 kHz")); vbox6_group = gtk_radio_button_group (GTK_RADIO_BUTTON (samp44)); gtk_widget_ref (samp44); diff -r f866da587845 -r a8e4435f65f2 Plugins/Input/modplug/gui/main.cpp --- a/Plugins/Input/modplug/gui/main.cpp Sun May 14 01:20:40 2006 -0700 +++ b/Plugins/Input/modplug/gui/main.cpp Sun May 14 08:38:23 2006 -0700 @@ -64,6 +64,8 @@ gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "samp11"), TRUE); else if (aProps.mFrequency == 22050) gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "samp22"), TRUE); + else if (aProps.mFrequency == 48000) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "samp48"), TRUE); else gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "samp44"), TRUE);