Mercurial > audlegacy-plugins
comparison src/madplug/plugin.c @ 651:b9167008fc3f trunk
[svn] - strings in audmad_config should be freed before update. thus constant initializer has been replaced with g_strdup().
| author | yaz |
|---|---|
| date | Wed, 14 Feb 2007 18:03:22 -0800 |
| parents | 8b9ef7a32e47 |
| children | 638b290641f3 |
comparison
equal
deleted
inserted
replaced
| 650:8b9ef7a32e47 | 651:b9167008fc3f |
|---|---|
| 101 | 101 |
| 102 audmad_config.fast_play_time_calc = TRUE; | 102 audmad_config.fast_play_time_calc = TRUE; |
| 103 audmad_config.use_xing = TRUE; | 103 audmad_config.use_xing = TRUE; |
| 104 audmad_config.dither = TRUE; | 104 audmad_config.dither = TRUE; |
| 105 audmad_config.sjis = FALSE; | 105 audmad_config.sjis = FALSE; |
| 106 audmad_config.pregain_db = "+0.00"; | 106 audmad_config.hard_limit = FALSE; |
| 107 audmad_config.replaygain.enable = TRUE; | 107 audmad_config.replaygain.enable = TRUE; |
| 108 audmad_config.replaygain.track_mode = FALSE; | 108 audmad_config.replaygain.track_mode = FALSE; |
| 109 audmad_config.hard_limit = FALSE; | 109 audmad_config.title_override = FALSE; |
| 110 audmad_config.replaygain.default_db = "-9.00"; | |
| 111 | 110 |
| 112 db = bmp_cfg_db_open(); | 111 db = bmp_cfg_db_open(); |
| 113 if (db) { | 112 if (db) { |
| 114 bmp_cfg_db_get_bool(db, "MAD", "fast_play_time_calc", | 113 bmp_cfg_db_get_bool(db, "MAD", "fast_play_time_calc", |
| 115 &audmad_config.fast_play_time_calc); | 114 &audmad_config.fast_play_time_calc); |
| 138 mad_mutex = g_mutex_new(); | 137 mad_mutex = g_mutex_new(); |
| 139 pb_mutex = g_mutex_new(); | 138 pb_mutex = g_mutex_new(); |
| 140 mad_cond = g_cond_new(); | 139 mad_cond = g_cond_new(); |
| 141 audmad_config_compute(&audmad_config); | 140 audmad_config_compute(&audmad_config); |
| 142 | 141 |
| 143 if (audmad_config.id3_format != NULL) | 142 if (!audmad_config.pregain_db) |
| 143 audmad_config.pregain_db = g_strdup("+0.00"); | |
| 144 | |
| 145 if (!audmad_config.replaygain.default_db) | |
| 146 audmad_config.replaygain.default_db = g_strdup("-9.00"); | |
| 147 | |
| 148 if (!audmad_config.id3_format) | |
| 144 audmad_config.id3_format = g_strdup(""); | 149 audmad_config.id3_format = g_strdup(""); |
| 145 } | 150 } |
| 146 | 151 |
| 147 static void audmad_cleanup() | 152 static void audmad_cleanup() |
| 148 { | 153 { |
