# HG changeset patch # User Matti Hamalainen # Date 1217427924 -10800 # Node ID 7a000caead2891026bfbeb5ec727163dd259c0c1 # Parent 587b3657990d7890339890e7cf99a04e091eed73 Only save volumes in alsa_save_config(). diff -r 587b3657990d -r 7a000caead28 src/alsa/configure.c --- a/src/alsa/configure.c Tue Jul 29 00:20:31 2008 +0300 +++ b/src/alsa/configure.c Wed Jul 30 17:25:24 2008 +0300 @@ -40,19 +40,24 @@ alsa_cfg.mixer_card = current_mixer_card; alsa_cfg.mixer_device = GET_CHARS(GTK_COMBO(mixer_devices_combo)->entry); + gtk_widget_destroy(configure_win); + + /* Save configuration */ + mcs_handle_t *cfgfile = aud_cfg_db_open(); + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "buffer_time", alsa_cfg.buffer_time); + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "period_time", alsa_cfg.period_time); + aud_cfg_db_set_string(cfgfile,ALSA_CFGID,"pcm_device", alsa_cfg.pcm_device); + aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "mixer_card", alsa_cfg.mixer_card); + aud_cfg_db_set_string(cfgfile,ALSA_CFGID,"mixer_device", alsa_cfg.mixer_device); + aud_cfg_db_close(cfgfile); + + /* Save volumes */ alsa_save_config(); - gtk_widget_destroy(configure_win); } void alsa_save_config(void) { mcs_handle_t *cfgfile = aud_cfg_db_open(); - - aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "buffer_time", alsa_cfg.buffer_time); - aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "period_time", alsa_cfg.period_time); - aud_cfg_db_set_string(cfgfile,ALSA_CFGID,"pcm_device", alsa_cfg.pcm_device); - aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "mixer_card", alsa_cfg.mixer_card); - aud_cfg_db_set_string(cfgfile,ALSA_CFGID,"mixer_device", alsa_cfg.mixer_device); aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "volume_left", alsa_cfg.vol.left); aud_cfg_db_set_int(cfgfile, ALSA_CFGID, "volume_right", alsa_cfg.vol.right); aud_cfg_db_close(cfgfile);