Mercurial > hg > xmms-sid
annotate src/xs_config.h @ 487:6357b7fe5b0d
Added new WTYPE_COMBO, the audio frequency selection now uses a combobox.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 26 Jan 2007 15:47:03 +0000 |
parents | 99f05a74de5b |
children | fa95d942f226 |
rev | line source |
---|---|
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
360
diff
changeset
|
1 #ifndef _XS_CONFIG_H |
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
360
diff
changeset
|
2 #define _XS_CONFIG_H |
20 | 3 |
214 | 4 #include "xmms-sid.h" |
5 | |
20 | 6 #ifdef __cplusplus |
7 extern "C" { | |
8 #endif | |
9 | |
10 /* | |
11 * Configuration structure | |
12 */ | |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
13 enum XS_EMUENGINE { |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
14 XS_ENG_SIDPLAY1 = 1, |
291
e0d671f62e60
Remove comma from end of enum list.
Matti Hamalainen <ccr@tnsp.org>
parents:
271
diff
changeset
|
15 XS_ENG_SIDPLAY2 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
16 }; |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
17 |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
18 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
19 enum XS_BUILDER { |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
20 XS_BLD_RESID = 1, |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
21 XS_BLD_HARDSID |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
22 }; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
23 |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
24 enum XS_RESOLUTION { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
25 XS_RES_8BIT = 8, |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
26 XS_RES_16BIT = 16 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
27 }; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
28 |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
29 enum XS_CHANNELS { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
30 XS_CHN_MONO = 1, |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
31 XS_CHN_STEREO = 2, |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
32 XS_CHN_AUTOPAN = 3 |
20 | 33 }; |
34 | |
35 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
36 enum XS_CLOCK { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
37 XS_CLOCK_PAL = 1, |
479
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
38 XS_CLOCK_NTSC, |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
39 XS_CLOCK_VBI, |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
40 XS_CLOCK_CIA, |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
41 XS_CLOCK_ANY |
20 | 42 }; |
43 | |
44 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
45 enum XS_MPU { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
46 XS_MPU_BANK_SWITCHING = 1, |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
47 XS_MPU_TRANSPARENT_ROM, |
44
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
48 XS_MPU_PLAYSID_ENVIRONMENT, |
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
49 XS_MPU_REAL |
20 | 50 }; |
51 | |
52 | |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
53 enum XS_SSC { |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
54 XS_SSC_NONE = 1, |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
55 XS_SSC_POPUP, |
132
4162a5370b9e
Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
56 XS_SSC_PATCH, |
4162a5370b9e
Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
57 XS_SSC_SEEK |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
58 }; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
59 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
60 |
202 | 61 enum XS_SIDMODEL { |
62 XS_SIDMODEL_UNKNOWN = 0, | |
63 XS_SIDMODEL_6581, | |
479
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
64 XS_SIDMODEL_8580, |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
65 XS_SIDMODEL_ANY |
202 | 66 }; |
67 | |
68 | |
20 | 69 extern struct t_xs_cfg { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
70 /* General audio settings */ |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
71 gint audioBitsPerSample; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
72 gint audioChannels; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
73 gint audioFrequency; |
20 | 74 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
75 /* General libSIDPlay settings */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
76 gboolean mos8580; /* TRUE = 8580, FALSE = 6581 */ |
360
3bea6584259f
Indentation fixes and SID model forcing
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
77 gboolean forceModel; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
78 gboolean emulateFilters; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
79 gfloat filterFs; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
80 gfloat filterFm; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
81 gfloat filterFt; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
82 gint memoryMode; /* See XS_MPU-constants */ |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
83 gint clockSpeed; /* PAL (50Hz) or NTSC (60Hz) */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
84 gboolean forceSpeed; /* TRUE = force to given clockspeed */ |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
85 |
190 | 86 gint playerEngine; /* Selected player engine */ |
87 | |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
88 gint sid2OptLevel; /* SIDPlay2 emulation optimization */ |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
89 gint sid2Builder; /* SIDPlay2 "builder" aka SID-emu */ |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
90 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
91 gboolean oversampleEnable; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
92 gint oversampleFactor; /* Factor of oversampling */ |
20 | 93 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
94 /* Playing settings */ |
169 | 95 gboolean playMaxTimeEnable, |
96 playMaxTimeUnknown; /* Use max-time only when song-length is unknown */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
97 gint playMaxTime; /* MAX playtime in seconds */ |
169 | 98 |
308
ae5795ba5c77
Remove "only when song-length unknown" option from minimum playtime, it
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
99 gboolean playMinTimeEnable; |
169 | 100 gint playMinTime; /* MIN playtime in seconds */ |
101 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
102 gboolean songlenDBEnable; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
103 gchar *songlenDBPath; /* Path to Songlengths.txt */ |
20 | 104 |
105 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
106 /* Miscellaneous settings */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
107 gboolean stilDBEnable; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
108 gchar *stilDBPath; /* Path to STIL.txt */ |
109
578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
109 gchar *hvscPath; /* Path-prefix for HVSC */ |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
110 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
111 gint subsongControl; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
112 gboolean detectMagic; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
113 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
114 gboolean titleOverride; /* TRUE if XMMS titles are overriden */ |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
115 gchar *titleFormat; |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
116 |
258
e255f23abf33
Automatic subtune changing options added to config.
Matti Hamalainen <ccr@tnsp.org>
parents:
243
diff
changeset
|
117 gboolean subAutoEnable, |
e255f23abf33
Automatic subtune changing options added to config.
Matti Hamalainen <ccr@tnsp.org>
parents:
243
diff
changeset
|
118 subAutoMinOnly; |
e255f23abf33
Automatic subtune changing options added to config.
Matti Hamalainen <ccr@tnsp.org>
parents:
243
diff
changeset
|
119 gint subAutoMinTime; |
20 | 120 } xs_cfg; |
121 | |
228
a9a5924eb10c
Have and use a mutex for xs_cfg configuration structure.
Matti Hamalainen <ccr@tnsp.org>
parents:
214
diff
changeset
|
122 XS_MUTEX_H(xs_cfg); |
20 | 123 |
124 /* | |
132
4162a5370b9e
Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
125 * Configuration-file |
20 | 126 */ |
127 enum { | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
128 CTYPE_INT = 1, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
129 CTYPE_FLOAT, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
130 CTYPE_STR, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
131 CTYPE_BOOL |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
132 }; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
133 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
134 enum { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
135 WTYPE_BGROUP = 1, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
136 WTYPE_SPIN, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
137 WTYPE_SCALE, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
138 WTYPE_BUTTON, |
487
6357b7fe5b0d
Added new WTYPE_COMBO, the audio frequency selection now uses a combobox.
Matti Hamalainen <ccr@tnsp.org>
parents:
479
diff
changeset
|
139 WTYPE_TEXT, |
6357b7fe5b0d
Added new WTYPE_COMBO, the audio frequency selection now uses a combobox.
Matti Hamalainen <ccr@tnsp.org>
parents:
479
diff
changeset
|
140 WTYPE_COMBO |
20 | 141 }; |
142 | |
143 | |
144 typedef struct { | |
161
02bbce56d6b0
Renamed some struct variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
145 gint itemType; /* Type of item (CTYPE_*) */ |
02bbce56d6b0
Renamed some struct variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
146 void *itemData; /* Pointer to variable */ |
02bbce56d6b0
Renamed some struct variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
147 gchar *itemName; /* Name of configuration item */ |
20 | 148 } t_xs_cfg_item; |
149 | |
150 | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
151 typedef struct { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
152 gint widType; |
161
02bbce56d6b0
Renamed some struct variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
153 gint itemType; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
154 gchar *widName; |
161
02bbce56d6b0
Renamed some struct variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
155 void *itemData; |
02bbce56d6b0
Renamed some struct variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
156 gint itemSet; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
157 } t_xs_wid_item; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
158 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
159 |
20 | 160 /* |
161 * Functions | |
162 */ | |
271
eebb38debe35
Separate xs_init_configuration() from xs_read_configuration()
Matti Hamalainen <ccr@tnsp.org>
parents:
258
diff
changeset
|
163 void xs_init_configuration(void); |
20 | 164 void xs_configure(void); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
165 void xs_read_configuration(void); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
166 gint xs_write_configuration(void); |
20 | 167 |
168 | |
169 #ifdef __cplusplus | |
170 } | |
171 #endif | |
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
360
diff
changeset
|
172 #endif /* _XS_CONFIG_H */ |