コード例 #1
0
void i_configure_cfg_ap_save( void )
{
  pcfg_t *cfgfile;
  gchar *config_pathfilename = i_configure_cfg_get_file();
  cfgfile = i_pcfg_new_from_file( config_pathfilename );

  if (!cfgfile)
    cfgfile = i_pcfg_new();

  /* save amidi-plug config information */
  i_pcfg_write_string( cfgfile , "general" , "ap_seq_backend" ,
                       amidiplug_cfg_ap.ap_seq_backend );
  i_pcfg_write_integer( cfgfile , "general" , "ap_opts_transpose_value" ,
                        amidiplug_cfg_ap.ap_opts_transpose_value );
  i_pcfg_write_integer( cfgfile , "general" , "ap_opts_drumshift_value" ,
                        amidiplug_cfg_ap.ap_opts_drumshift_value );
  i_pcfg_write_integer( cfgfile , "general" , "ap_opts_length_precalc" ,
                        amidiplug_cfg_ap.ap_opts_length_precalc );
  i_pcfg_write_integer( cfgfile , "general" , "ap_opts_lyrics_extract" ,
                        amidiplug_cfg_ap.ap_opts_lyrics_extract );
  i_pcfg_write_integer( cfgfile , "general" , "ap_opts_comments_extract" ,
                        amidiplug_cfg_ap.ap_opts_comments_extract );

  i_pcfg_write_to_file( cfgfile , config_pathfilename );
  i_pcfg_free( cfgfile );
  g_free( config_pathfilename );
}
コード例 #2
0
void i_configure_cfg_backend_save( void )
{
  pcfg_t *cfgfile;
  gchar *config_pathfilename = i_configure_cfg_get_file();

  cfgfile = i_pcfg_new_from_file( config_pathfilename );

  if (!cfgfile)
    cfgfile = i_pcfg_new();

  i_configure_cfg_alsa_save( cfgfile ); /* save alsa backend configuration */
  i_configure_cfg_fsyn_save( cfgfile ); /* save fluidsynth backend configuration */

  i_pcfg_write_to_file( cfgfile , config_pathfilename );
  i_pcfg_free( cfgfile );
  g_free( config_pathfilename );
}
コード例 #3
0
void i_configure_cfg_backend_save( void )
{
  pcfg_t *cfgfile;
  gchar *config_pathfilename = i_configure_cfg_get_file();

  cfgfile = i_pcfg_new_from_file( config_pathfilename );

  if (!cfgfile)
    cfgfile = i_pcfg_new();

#ifdef AMIDIPLUG_ALSA
  i_configure_cfg_alsa_save( cfgfile ); /* save alsa backend configuration */
#endif
#ifdef AMIDIPLUG_FLUIDSYNTH
  i_configure_cfg_fsyn_save( cfgfile ); /* save fluidsynth backend configuration */
#endif

  i_pcfg_write_to_file( cfgfile , config_pathfilename );
  i_pcfg_free( cfgfile );
  g_free( config_pathfilename );
}