From: Takashi Iwai Date: Thu, 4 Aug 2005 16:01:10 +0000 (+0000) Subject: envy24control save state of LRGang button in config file X-Git-Tag: v1.0.10rc1~2 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=1d0881e2125ca4fe6cac712c70e24580c19f285f;p=alsa-tools.git envy24control save state of LRGang button in config file From: Dirk Jagdmann The last mail I sent for this topic contained a non functional patch, which has not been included in CVS yet. I resend the patch, which should now work. --- diff --git a/envy24control/Makefile.am b/envy24control/Makefile.am index 9e03648..38e1b3d 100644 --- a/envy24control/Makefile.am +++ b/envy24control/Makefile.am @@ -3,7 +3,7 @@ bin_PROGRAMS = envy24control man_MANS = envy24control.1 envy24control_SOURCES = envy24control.c envy24control.h levelmeters.c midi.c \ mixer.c patchbay.c hardware.c driverevents.c volume.c \ - profiles.c profiles.h midi.h + profiles.c profiles.h midi.h config.c config.h envy24control_LDFLAGS = @ENVY24CONTROL_LIBS@ EXTRA_DIST = envy24control.1 depcomp configure.in-gtk2 \ strstr_icase_blank.c new_process.c README.profiles diff --git a/envy24control/envy24control.c b/envy24control/envy24control.c index cf30e08..1aaf982 100644 --- a/envy24control/envy24control.c +++ b/envy24control/envy24control.c @@ -22,6 +22,7 @@ #include "envy24control.h" #include "midi.h" +#include "config.h" #define _GNU_SOURCE #include @@ -244,7 +245,9 @@ static void create_mixer_frame(GtkWidget *box, int stream) gtk_widget_show(toggle); gtk_box_pack_end(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); /* gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), TRUE); */ - + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + GTK_SIGNAL_FUNC(config_set_stereo), (gpointer)stream-1); + hbox = gtk_hbox_new(TRUE, 6); gtk_widget_show(hbox); gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -2118,6 +2121,7 @@ int main(int argc, char **argv) } /* Initialize code */ + config_open(); level_meters_init(); mixer_init(); patchbay_init(); @@ -2187,6 +2191,7 @@ int main(int argc, char **argv) snd_ctl_close(ctl); midi_close(); + config_close(); return EXIT_SUCCESS; } diff --git a/envy24control/mixer.c b/envy24control/mixer.c index 48c33a9..7de0486 100644 --- a/envy24control/mixer.c +++ b/envy24control/mixer.c @@ -19,6 +19,7 @@ #include "envy24control.h" #include "midi.h" +#include "config.h" #define MULTI_PLAYBACK_SWITCH "Multi Playback Switch" #define MULTI_PLAYBACK_VOLUME "Multi Playback Volume" @@ -268,4 +269,6 @@ void mixer_postinit(void) if (stream_is_active[stream - 1]) mixer_update_stream(stream, 1, 1); } + + config_restore_stereo(); }