comparison src/madplug/plugin.c @ 916:a8494c2a87eb trunk

[svn] revise reopen output code for #880. time count would be reset if output was closed. so I took two measures for it. - 1. time count will be recorded and restored on reopen. this seems to be right way, but it causes a short stoppage of playback. - 2. introduce a new plugin option "force_reopen_audio". if this is set to FALSE (default), decoder will not reopen output. this is a bit rude, but does not cause any interruption.
author yaz
date Thu, 05 Apr 2007 21:12:59 -0700
parents 44a922a4a591
children 7e14701aef54
comparison
equal deleted inserted replaced
915:1ccc7a9c7fc2 916:a8494c2a87eb
127 audmad_config.hard_limit = FALSE; 127 audmad_config.hard_limit = FALSE;
128 audmad_config.replaygain.enable = TRUE; 128 audmad_config.replaygain.enable = TRUE;
129 audmad_config.replaygain.track_mode = FALSE; 129 audmad_config.replaygain.track_mode = FALSE;
130 audmad_config.title_override = FALSE; 130 audmad_config.title_override = FALSE;
131 audmad_config.show_avg_vbr_bitrate = TRUE; 131 audmad_config.show_avg_vbr_bitrate = TRUE;
132 audmad_config.force_reopen_audio = FALSE;
132 133
133 db = bmp_cfg_db_open(); 134 db = bmp_cfg_db_open();
134 if (db) { 135 if (db) {
135 bmp_cfg_db_get_bool(db, "MAD", "fast_play_time_calc", 136 bmp_cfg_db_get_bool(db, "MAD", "fast_play_time_calc",
136 &audmad_config.fast_play_time_calc); 137 &audmad_config.fast_play_time_calc);
152 &audmad_config.title_override); 153 &audmad_config.title_override);
153 bmp_cfg_db_get_string(db, "MAD", "id3_format", 154 bmp_cfg_db_get_string(db, "MAD", "id3_format",
154 &audmad_config.id3_format); 155 &audmad_config.id3_format);
155 bmp_cfg_db_get_bool(db, "MAD", "show_avg_vbr_bitrate", 156 bmp_cfg_db_get_bool(db, "MAD", "show_avg_vbr_bitrate",
156 &audmad_config.show_avg_vbr_bitrate); 157 &audmad_config.show_avg_vbr_bitrate);
158 bmp_cfg_db_get_bool(db, "MAD", "force_reopen_audio",
159 &audmad_config.force_reopen_audio);
157 160
158 bmp_cfg_db_close(db); 161 bmp_cfg_db_close(db);
159 } 162 }
160 163
161 mad_mutex = g_mutex_new(); 164 mad_mutex = g_mutex_new();