@@ -31,6 +31,9 @@ pub struct Config {
3131 pub last_songlength_file : Option < String > ,
3232 /// Last directory used for playlists.
3333 pub last_playlist_dir : Option < String > ,
34+ /// Force stereo mirroring for 2SID tunes (duplicate SID1 writes to SID2).
35+ /// When enabled, 2SID tunes play in mono-stereo mode instead of true dual-SID.
36+ pub force_stereo_2sid : bool ,
3437}
3538
3639impl Default for Config {
@@ -46,6 +49,7 @@ impl Default for Config {
4649 last_songlength_dir : None ,
4750 last_songlength_file : None ,
4851 last_playlist_dir : None ,
52+ force_stereo_2sid : false ,
4953 }
5054 }
5155}
@@ -155,6 +159,9 @@ impl Config {
155159 if val != "null" {
156160 config. last_playlist_dir = strip_json_string ( val) ;
157161 }
162+ } else if let Some ( rest) = line. strip_prefix ( "\" force_stereo_2sid\" " ) {
163+ let val = rest. trim ( ) . trim_start_matches ( ':' ) . trim ( ) ;
164+ config. force_stereo_2sid = val == "true" ;
158165 }
159166 }
160167
@@ -181,7 +188,8 @@ impl Config {
181188 " \" last_sid_dir\" : {},\n " ,
182189 " \" last_songlength_dir\" : {},\n " ,
183190 " \" last_songlength_file\" : {},\n " ,
184- " \" last_playlist_dir\" : {}\n " ,
191+ " \" last_playlist_dir\" : {},\n " ,
192+ " \" force_stereo_2sid\" : {}\n " ,
185193 "}}\n " ,
186194 ) ,
187195 self . skip_rsid,
@@ -194,6 +202,7 @@ impl Config {
194202 fmt_opt( & self . last_songlength_dir) ,
195203 fmt_opt( & self . last_songlength_file) ,
196204 fmt_opt( & self . last_playlist_dir) ,
205+ self . force_stereo_2sid,
197206 )
198207 }
199208
0 commit comments