269
|
1 #ifndef XS_CONFIG_H
|
|
2 #define XS_CONFIG_H
|
|
3
|
|
4 #include "xmms-sid.h"
|
|
5
|
|
6 #ifdef __cplusplus
|
|
7 extern "C" {
|
|
8 #endif
|
|
9
|
|
10 /*
|
|
11 * Configuration structure
|
|
12 */
|
|
13 enum XS_EMUENGINE {
|
|
14 XS_ENG_SIDPLAY1 = 1,
|
|
15 XS_ENG_SIDPLAY2
|
|
16 };
|
|
17
|
|
18
|
|
19 enum XS_BUILDER {
|
|
20 XS_BLD_RESID = 1,
|
|
21 XS_BLD_HARDSID
|
|
22 };
|
|
23
|
|
24 enum XS_RESOLUTION {
|
|
25 XS_RES_8BIT = 8,
|
|
26 XS_RES_16BIT = 16
|
|
27 };
|
|
28
|
|
29 enum XS_CHANNELS {
|
|
30 XS_CHN_MONO = 1,
|
|
31 XS_CHN_STEREO = 2,
|
|
32 XS_CHN_AUTOPAN = 3
|
|
33 };
|
|
34
|
|
35
|
|
36 enum XS_CLOCK {
|
|
37 XS_CLOCK_PAL = 1,
|
|
38 XS_CLOCK_NTSC
|
|
39 };
|
|
40
|
|
41
|
|
42 enum XS_MPU {
|
|
43 XS_MPU_BANK_SWITCHING = 1,
|
|
44 XS_MPU_TRANSPARENT_ROM,
|
|
45 XS_MPU_PLAYSID_ENVIRONMENT,
|
|
46 XS_MPU_REAL
|
|
47 };
|
|
48
|
|
49
|
|
50 enum XS_SSC {
|
|
51 XS_SSC_NONE = 1,
|
|
52 XS_SSC_POPUP,
|
|
53 XS_SSC_PATCH,
|
|
54 XS_SSC_SEEK
|
|
55 };
|
|
56
|
|
57
|
|
58 enum XS_SIDMODEL {
|
|
59 XS_SIDMODEL_UNKNOWN = 0,
|
|
60 XS_SIDMODEL_6581,
|
|
61 XS_SIDMODEL_8580
|
|
62 };
|
|
63
|
|
64
|
|
65 extern struct t_xs_cfg {
|
|
66 /* General audio settings */
|
|
67 gint audioBitsPerSample;
|
|
68 gint audioChannels;
|
|
69 gint audioFrequency;
|
|
70
|
|
71 /* General libSIDPlay settings */
|
|
72 gboolean mos8580; /* TRUE = 8580, FALSE = 6581 */
|
|
73 gboolean forceModel;
|
|
74 gboolean emulateFilters;
|
|
75 gfloat filterFs;
|
|
76 gfloat filterFm;
|
|
77 gfloat filterFt;
|
|
78 gint memoryMode; /* See XS_MPU-constants */
|
|
79 gint clockSpeed; /* PAL (50Hz) or NTSC (60Hz) */
|
|
80 gboolean forceSpeed; /* TRUE = force to given clockspeed */
|
|
81
|
|
82 gint playerEngine; /* Selected player engine */
|
|
83
|
|
84 gboolean sid2OptLevel; /* SIDPlay2 emulation optimization */
|
|
85 gint sid2Builder; /* SIDPlay2 "builder" aka SID-emu */
|
|
86
|
|
87 gboolean oversampleEnable;
|
|
88 gint oversampleFactor; /* Factor of oversampling */
|
|
89
|
|
90 /* Playing settings */
|
|
91 gboolean playMaxTimeEnable,
|
|
92 playMaxTimeUnknown; /* Use max-time only when song-length is unknown */
|
|
93 gint playMaxTime; /* MAX playtime in seconds */
|
|
94
|
|
95 gboolean playMinTimeEnable;
|
|
96 gint playMinTime; /* MIN playtime in seconds */
|
|
97
|
|
98 gboolean songlenDBEnable;
|
|
99 gchar *songlenDBPath; /* Path to Songlengths.txt */
|
|
100
|
|
101
|
|
102 /* Miscellaneous settings */
|
|
103 gboolean stilDBEnable;
|
|
104 gchar *stilDBPath; /* Path to STIL.txt */
|
|
105 gchar *hvscPath; /* Path-prefix for HVSC */
|
|
106
|
|
107 gint subsongControl;
|
|
108 gboolean detectMagic;
|
|
109
|
|
110 gboolean titleOverride; /* TRUE if XMMS titles are overriden */
|
|
111 gchar *titleFormat;
|
|
112
|
|
113 gboolean subAutoEnable,
|
|
114 subAutoMinOnly;
|
|
115 gint subAutoMinTime;
|
|
116 } xs_cfg;
|
|
117
|
|
118 /*
|
|
119 * Configuration-file
|
|
120 */
|
|
121 enum {
|
|
122 CTYPE_INT = 1,
|
|
123 CTYPE_FLOAT,
|
|
124 CTYPE_STR,
|
|
125 CTYPE_BOOL
|
|
126 };
|
|
127
|
|
128 enum {
|
|
129 WTYPE_BGROUP = 1,
|
|
130 WTYPE_SPIN,
|
|
131 WTYPE_SCALE,
|
|
132 WTYPE_BUTTON,
|
|
133 WTYPE_TEXT
|
|
134 };
|
|
135
|
|
136
|
|
137 typedef struct {
|
|
138 gint itemType; /* Type of item (CTYPE_*) */
|
|
139 void *itemData; /* Pointer to variable */
|
|
140 gchar *itemName; /* Name of configuration item */
|
|
141 } t_xs_cfg_item;
|
|
142
|
|
143
|
|
144 typedef struct {
|
|
145 gint widType;
|
|
146 gint itemType;
|
|
147 gchar *widName;
|
|
148 void *itemData;
|
|
149 gint itemSet;
|
|
150 } t_xs_wid_item;
|
|
151
|
|
152
|
|
153 /*
|
|
154 * Functions
|
|
155 */
|
|
156 void xs_init_configuration(void);
|
|
157 void xs_configure(void);
|
|
158 void xs_read_configuration(void);
|
|
159 gint xs_write_configuration(void);
|
|
160
|
|
161
|
|
162 #ifdef __cplusplus
|
|
163 }
|
|
164 #endif
|
|
165 #endif /* XS_CONFIG_H */
|