Mercurial > hg > xmms-sid
annotate src/xs_config.h @ 156:a57fb0799259
Cleanups
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 09 Mar 2004 21:12:00 +0000 |
parents | 4162a5370b9e |
children | 02bbce56d6b0 |
rev | line source |
---|---|
20 | 1 #ifndef XS_CONFIG_H |
2 #define XS_CONFIG_H | |
3 | |
4 #ifdef __cplusplus | |
5 extern "C" { | |
6 #endif | |
7 | |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
44
diff
changeset
|
8 #include "xmms-sid.h" |
20 | 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, |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
15 XS_ENG_SIDPLAY2, |
73
2bc607888f53
Added libsidplay2 module, lots of reworking of internals, sidplay1 support
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
16 XS_ENG_NANOSID |
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 { |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
21 XS_BLD_RESID = 1, |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
22 XS_BLD_HARDSID |
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 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
26 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
|
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 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
31 XS_CHN_MONO = 1, |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
32 XS_CHN_STEREO = 2, |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
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 { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
38 XS_CLOCK_PAL = 1, |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
39 XS_CLOCK_NTSC |
20 | 40 }; |
41 | |
42 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
43 enum XS_MPU { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
44 XS_MPU_BANK_SWITCHING = 1, |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
45 XS_MPU_TRANSPARENT_ROM, |
44
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
46 XS_MPU_PLAYSID_ENVIRONMENT, |
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
47 XS_MPU_REAL |
20 | 48 }; |
49 | |
50 | |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
51 enum XS_FILTER { |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
52 XS_FILTER_AVERAGE = 1, |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
53 XS_FILTER_SINC |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
54 }; |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
55 |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
56 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
57 enum XS_SSC { |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
58 XS_SSC_NONE = 1, |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
59 XS_SSC_POPUP, |
132
4162a5370b9e
Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
60 XS_SSC_PATCH, |
4162a5370b9e
Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
61 XS_SSC_SEEK |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
62 }; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
63 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
64 |
20 | 65 extern struct t_xs_cfg { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
66 /* General audio settings */ |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
67 gint audioBitsPerSample; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
68 gint audioChannels; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
69 gint audioFrequency; |
20 | 70 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
71 /* General libSIDPlay settings */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
72 gboolean mos8580; /* TRUE = 8580, FALSE = 6581 */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
73 gboolean emulateFilters; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
74 gfloat filterFs; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
75 gfloat filterFm; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
76 gfloat filterFt; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
77 gint memoryMode; /* See XS_MPU-constants */ |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
78 gint clockSpeed; /* PAL (50Hz) or NTSC (60Hz) */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
79 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
|
80 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
81 gboolean sid2OptLevel; /* SIDPlay2 emulation optimization */ |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
82 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
|
83 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
84 gboolean oversampleEnable; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
85 gint oversampleFactor; /* Factor of oversampling */ |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
86 gint oversampleFilter; /* Oversampling filter type */ |
20 | 87 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
88 /* Playing settings */ |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
89 gboolean playMaxTimeEnable; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
90 gint playMaxTime; /* MAX playtime in seconds */ |
65
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
64
diff
changeset
|
91 gboolean 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
|
92 gboolean songlenDBEnable; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
93 gchar *songlenDBPath; /* Path to Songlengths.txt */ |
20 | 94 |
69 | 95 gboolean silenceEnable; /* Silence detection */ |
96 gint silenceMinTime; | |
97 gint silenceMaxCheck; | |
20 | 98 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
99 /* Miscellaneous settings */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
100 gboolean stilDBEnable; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
101 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
|
102 gchar *hvscPath; /* Path-prefix for HVSC */ |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
103 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
104 gint subsongControl; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
105 gboolean detectMagic; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
106 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
107 gboolean titleOverride; /* TRUE if XMMS titles are overriden */ |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
108 gchar *titleFormat; |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
109 |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
110 gint playerEngine; |
20 | 111 } xs_cfg; |
112 | |
113 | |
114 /* | |
132
4162a5370b9e
Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
115 * Configuration-file |
20 | 116 */ |
117 enum { | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
118 CTYPE_INT = 1, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
119 CTYPE_FLOAT, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
120 CTYPE_STR, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
121 CTYPE_BOOL |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
122 }; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
123 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
124 enum { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
125 WTYPE_BGROUP = 1, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
126 WTYPE_SPIN, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
127 WTYPE_SCALE, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
128 WTYPE_BUTTON, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
129 WTYPE_TEXT |
20 | 130 }; |
131 | |
132 | |
133 typedef struct { | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
134 gint valType; /* Type of item (ATYPE_*) */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
135 void *valData; /* Pointer to variable */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
136 gchar *valName; /* Name of configuration item */ |
20 | 137 } t_xs_cfg_item; |
138 | |
139 | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
140 typedef struct { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
141 gint widType; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
142 gint valType; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
143 gchar *widName; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
144 void *valData; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
145 gint valSet; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
146 } t_xs_wid_item; |
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 |
20 | 149 /* |
150 * Functions | |
151 */ | |
152 void xs_configure(void); | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
153 void xs_read_configuration(void); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
154 gint xs_write_configuration(void); |
20 | 155 |
156 | |
157 #ifdef __cplusplus | |
158 } | |
159 #endif | |
160 #endif /* XS_CONFIG_H */ |