Mercurial > audlegacy
changeset 1015:bc14606391fc trunk
[svn] - don't use XMMS ConfigFile interface here
author | nenolod |
---|---|
date | Tue, 09 May 2006 09:52:49 -0700 |
parents | 9b26df736b62 |
children | 400161c76515 |
files | Plugins/Input/amidi-plug/i_configure.c Plugins/Input/amidi-plug/i_configure.h |
diffstat | 2 files changed, 17 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Input/amidi-plug/i_configure.c Tue May 09 09:04:44 2006 -0700 +++ b/Plugins/Input/amidi-plug/i_configure.c Tue May 09 09:52:49 2006 -0700 @@ -398,8 +398,8 @@ void i_configure_cfg_read( void ) { - ConfigFile *cfgfile; - cfgfile = xmms_cfg_open_default_file(); + ConfigDb *cfgfile; + cfgfile = bmp_cfg_db_open(); if (!cfgfile) { @@ -412,40 +412,36 @@ } else { - if ( !xmms_cfg_read_string( cfgfile , "amidi-plug" , "writable_ports" , &amidiplug_cfg.seq_writable_ports ) ) + if ( !bmp_cfg_db_get_string( cfgfile , "amidi-plug" , "writable_ports" , &amidiplug_cfg.seq_writable_ports ) ) amidiplug_cfg.seq_writable_ports = i_configure_read_seq_ports_default(); /* default value */ - if ( !xmms_cfg_read_int( cfgfile , "amidi-plug" , "mixer_card_id" , &amidiplug_cfg.mixer_card_id ) ) + if ( !bmp_cfg_db_get_int( cfgfile , "amidi-plug" , "mixer_card_id" , &amidiplug_cfg.mixer_card_id ) ) amidiplug_cfg.mixer_card_id = 0; /* default value */ - if ( !xmms_cfg_read_string( cfgfile , "amidi-plug" , "mixer_control_name" , &amidiplug_cfg.mixer_control_name ) ) + if ( !bmp_cfg_db_get_string( cfgfile , "amidi-plug" , "mixer_control_name" , &amidiplug_cfg.mixer_control_name ) ) amidiplug_cfg.mixer_control_name = g_strdup( "Synth" ); /* default value */ - if ( !xmms_cfg_read_int( cfgfile , "amidi-plug" , "mixer_control_id" , &amidiplug_cfg.mixer_control_id ) ) + if ( !bmp_cfg_db_get_int( cfgfile , "amidi-plug" , "mixer_control_id" , &amidiplug_cfg.mixer_control_id ) ) amidiplug_cfg.mixer_control_id = 0; /* default value */ - if ( !xmms_cfg_read_int( cfgfile , "amidi-plug" , "length_precalc_enable" , &amidiplug_cfg.length_precalc_enable ) ) + if ( !bmp_cfg_db_get_int( cfgfile , "amidi-plug" , "length_precalc_enable" , &amidiplug_cfg.length_precalc_enable ) ) amidiplug_cfg.length_precalc_enable = 0; /* default value */ - xmms_cfg_free(cfgfile); + bmp_cfg_db_close(cfgfile); } } void i_configure_cfg_save( void ) { - ConfigFile *cfgfile; - cfgfile = xmms_cfg_open_default_file(); - - if (!cfgfile) - cfgfile = xmms_cfg_new(); + ConfigDb *cfgfile; + cfgfile = bmp_cfg_db_open(); - xmms_cfg_write_string( cfgfile , "amidi-plug" , "writable_ports" , amidiplug_cfg.seq_writable_ports ); - xmms_cfg_write_int( cfgfile , "amidi-plug" , "mixer_card_id" , amidiplug_cfg.mixer_card_id ); - xmms_cfg_write_string( cfgfile , "amidi-plug" , "mixer_control_name" , amidiplug_cfg.mixer_control_name ); - xmms_cfg_write_int( cfgfile , "amidi-plug" , "mixer_control_id" , amidiplug_cfg.mixer_control_id ); - xmms_cfg_write_int( cfgfile , "amidi-plug" , "length_precalc_enable" , amidiplug_cfg.length_precalc_enable ); + bmp_cfg_db_set_string( cfgfile , "amidi-plug" , "writable_ports" , amidiplug_cfg.seq_writable_ports ); + bmp_cfg_db_set_int( cfgfile , "amidi-plug" , "mixer_card_id" , amidiplug_cfg.mixer_card_id ); + bmp_cfg_db_set_string( cfgfile , "amidi-plug" , "mixer_control_name" , amidiplug_cfg.mixer_control_name ); + bmp_cfg_db_set_int( cfgfile , "amidi-plug" , "mixer_control_id" , amidiplug_cfg.mixer_control_id ); + bmp_cfg_db_set_int( cfgfile , "amidi-plug" , "length_precalc_enable" , amidiplug_cfg.length_precalc_enable ); - xmms_cfg_write_default_file(cfgfile); - xmms_cfg_free(cfgfile); + bmp_cfg_db_close(cfgfile); }