envy24control save state of LRGang button in config file

From: Dirk Jagdmann <doj@cubic.org>

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.
This commit is contained in:
Takashi Iwai 2005-08-04 16:01:10 +00:00
parent 603e129bc5
commit 1d0881e212
3 changed files with 10 additions and 2 deletions

View file

@ -3,7 +3,7 @@ bin_PROGRAMS = envy24control
man_MANS = envy24control.1 man_MANS = envy24control.1
envy24control_SOURCES = envy24control.c envy24control.h levelmeters.c midi.c \ envy24control_SOURCES = envy24control.c envy24control.h levelmeters.c midi.c \
mixer.c patchbay.c hardware.c driverevents.c volume.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@ envy24control_LDFLAGS = @ENVY24CONTROL_LIBS@
EXTRA_DIST = envy24control.1 depcomp configure.in-gtk2 \ EXTRA_DIST = envy24control.1 depcomp configure.in-gtk2 \
strstr_icase_blank.c new_process.c README.profiles strstr_icase_blank.c new_process.c README.profiles

View file

@ -22,6 +22,7 @@
#include "envy24control.h" #include "envy24control.h"
#include "midi.h" #include "midi.h"
#include "config.h"
#define _GNU_SOURCE #define _GNU_SOURCE
#include <getopt.h> #include <getopt.h>
@ -244,7 +245,9 @@ static void create_mixer_frame(GtkWidget *box, int stream)
gtk_widget_show(toggle); gtk_widget_show(toggle);
gtk_box_pack_end(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); gtk_box_pack_end(GTK_BOX(vbox), toggle, FALSE, FALSE, 0);
/* gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), TRUE); */ /* 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); hbox = gtk_hbox_new(TRUE, 6);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
@ -2118,6 +2121,7 @@ int main(int argc, char **argv)
} }
/* Initialize code */ /* Initialize code */
config_open();
level_meters_init(); level_meters_init();
mixer_init(); mixer_init();
patchbay_init(); patchbay_init();
@ -2187,6 +2191,7 @@ int main(int argc, char **argv)
snd_ctl_close(ctl); snd_ctl_close(ctl);
midi_close(); midi_close();
config_close();
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

View file

@ -19,6 +19,7 @@
#include "envy24control.h" #include "envy24control.h"
#include "midi.h" #include "midi.h"
#include "config.h"
#define MULTI_PLAYBACK_SWITCH "Multi Playback Switch" #define MULTI_PLAYBACK_SWITCH "Multi Playback Switch"
#define MULTI_PLAYBACK_VOLUME "Multi Playback Volume" #define MULTI_PLAYBACK_VOLUME "Multi Playback Volume"
@ -268,4 +269,6 @@ void mixer_postinit(void)
if (stream_is_active[stream - 1]) if (stream_is_active[stream - 1])
mixer_update_stream(stream, 1, 1); mixer_update_stream(stream, 1, 1);
} }
config_restore_stereo();
} }