Mercurial > hg > xmms-sid
annotate src/xs_config.h @ 702:b5b6b13a6d85
Renamed some types.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 25 May 2008 01:38:48 +0300 |
parents | 7bc76d9fa6cd |
children | 06db79680afe |
rev | line source |
---|---|
526
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
487
diff
changeset
|
1 #ifndef XS_CONFIG_H |
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
487
diff
changeset
|
2 #define XS_CONFIG_H |
20 | 3 |
214 | 4 #include "xmms-sid.h" |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
5 #include "xs_curve.h" |
214 | 6 |
20 | 7 #ifdef __cplusplus |
8 extern "C" { | |
9 #endif | |
10 | |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
11 |
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
12 /* Configuration structure |
20 | 13 */ |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
14 enum XS_EMUENGINE { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
15 XS_ENG_SIDPLAY1 = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
16 XS_ENG_SIDPLAY2 |
72
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 |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
19 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
20 enum XS_BUILDER { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
21 XS_BLD_RESID = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
22 XS_BLD_HARDSID |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
23 }; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
24 |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
25 enum XS_RESOLUTION { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
26 XS_RES_8BIT = 8, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
27 XS_RES_16BIT = 16 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
28 }; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
29 |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
30 enum XS_CHANNELS { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
31 XS_CHN_MONO = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
32 XS_CHN_STEREO = 2, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
33 XS_CHN_AUTOPAN = 3 |
20 | 34 }; |
35 | |
36 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
37 enum XS_CLOCK { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
38 XS_CLOCK_PAL = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
39 XS_CLOCK_NTSC, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
40 XS_CLOCK_VBI, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
41 XS_CLOCK_CIA, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
42 XS_CLOCK_ANY |
20 | 43 }; |
44 | |
45 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
46 enum XS_MPU { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
47 XS_MPU_BANK_SWITCHING = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
48 XS_MPU_TRANSPARENT_ROM, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
49 XS_MPU_PLAYSID_ENVIRONMENT, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
50 XS_MPU_REAL |
20 | 51 }; |
52 | |
53 | |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
54 enum XS_SSC { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
55 XS_SSC_NONE = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
56 XS_SSC_POPUP, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
57 XS_SSC_PATCH, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
58 XS_SSC_SEEK |
78
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 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
61 |
202 | 62 enum XS_SIDMODEL { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
63 XS_SIDMODEL_UNKNOWN = 0, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
64 XS_SIDMODEL_6581, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
65 XS_SIDMODEL_8580, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
66 XS_SIDMODEL_ANY |
202 | 67 }; |
68 | |
69 | |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
70 typedef struct { |
702 | 71 gint type; |
72 xs_int_point_t points[XS_SIDPLAY2_NFPOINTS]; | |
73 gint npoints; | |
74 gchar *name; | |
75 } xs_sid2_filter_t; | |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
76 |
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
77 |
702 | 78 extern struct xs_cfg_t { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
79 /* General audio settings */ |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
80 gint audioBitsPerSample; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
81 gint audioChannels; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
82 gint audioFrequency; |
20 | 83 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
84 gboolean oversampleEnable; |
685 | 85 gint oversampleFactor; /* Factor of oversampling */ |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
86 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
87 /* Emulation settings */ |
685 | 88 gboolean mos8580; /* TRUE = 8580, FALSE = 6581 */ |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
89 gboolean forceModel; |
685 | 90 gint memoryMode; /* See XS_MPU-constants */ |
91 gint clockSpeed; /* PAL (50Hz) or NTSC (60Hz) */ | |
92 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
|
93 |
685 | 94 gint playerEngine; /* Selected player engine */ |
190 | 95 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
96 gboolean emulateFilters; |
685 | 97 gfloat sid1FilterFs; |
98 gfloat sid1FilterFm; | |
99 gfloat sid1FilterFt; | |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
100 |
685 | 101 gint sid2OptLevel; /* SIDPlay2 emulation optimization */ |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
102 gint sid2Builder; /* SIDPlay2 "builder" aka SID-emu */ |
702 | 103 xs_sid2_filter_t sid2Filter; /* Current SIDPlay2 filter */ |
104 xs_sid2_filter_t **sid2FilterPresets; | |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
105 gint sid2NFilterPresets; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
106 |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
107 |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
108 /* Playing settings */ |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
109 gboolean playMaxTimeEnable, |
685 | 110 playMaxTimeUnknown; /* Use max-time only when song-length is unknown */ |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
111 gint playMaxTime; /* MAX playtime in seconds */ |
169 | 112 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
113 gboolean playMinTimeEnable; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
114 gint playMinTime; /* MIN playtime in seconds */ |
169 | 115 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
116 gboolean songlenDBEnable; |
685 | 117 gchar *songlenDBPath; /* Path to Songlengths.txt */ |
20 | 118 |
119 | |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
120 /* Miscellaneous settings */ |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
121 gboolean stilDBEnable; |
685 | 122 gchar *stilDBPath; /* Path to STIL.txt */ |
123 gchar *hvscPath; /* Path-prefix for HVSC */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
124 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
125 gint subsongControl; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
126 gboolean detectMagic; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
127 |
685 | 128 gboolean titleOverride; /* TRUE if XMMS titles are overriden */ |
129 gchar *titleFormat; | |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
130 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
131 gboolean subAutoEnable, |
685 | 132 subAutoMinOnly; |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
133 gint subAutoMinTime; |
20 | 134 } xs_cfg; |
135 | |
228
a9a5924eb10c
Have and use a mutex for xs_cfg configuration structure.
Matti Hamalainen <ccr@tnsp.org>
parents:
214
diff
changeset
|
136 XS_MUTEX_H(xs_cfg); |
20 | 137 |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
138 |
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
139 /* Configuration-file |
20 | 140 */ |
141 enum { | |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
142 CTYPE_INT = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
143 CTYPE_FLOAT, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
144 CTYPE_STR, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
145 CTYPE_BOOL |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
146 }; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
147 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
148 enum { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
149 WTYPE_BGROUP = 1, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
150 WTYPE_SPIN, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
151 WTYPE_SCALE, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
152 WTYPE_BUTTON, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
153 WTYPE_TEXT, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
154 WTYPE_COMBO |
20 | 155 }; |
156 | |
157 | |
158 typedef struct { | |
685 | 159 gint itemType; /* Type of item (CTYPE_*) */ |
160 void *itemData; /* Pointer to variable */ | |
161 gchar *itemName; /* Name of configuration item */ | |
702 | 162 } xs_cfg_item_t; |
20 | 163 |
164 | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
165 typedef struct { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
166 gint widType; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
167 gint itemType; |
685 | 168 gchar *widName; |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
169 void *itemData; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
170 gint itemSet; |
702 | 171 } xs_wid_item_t; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
172 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
173 |
548
ba80c052e425
Configuration widget naming cleanups and GUI-related improvements;
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
174 /* Functions |
20 | 175 */ |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
176 void xs_init_configuration(void); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
177 void xs_configure(void); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
178 void xs_read_configuration(void); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
179 gint xs_write_configuration(void); |
20 | 180 |
181 #ifdef __cplusplus | |
182 } | |
183 #endif | |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
548
diff
changeset
|
184 #endif /* XS_CONFIG_H */ |