annotate src/xs_config.h @ 73:2bc607888f53

Added libsidplay2 module, lots of reworking of internals, sidplay1 support now works with the new framework! Getting libsidplay2 support working shouldn't be too far now...
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 14 Sep 2003 03:14:01 +0000
parents e3b205a6bc7e
children 653c9b0d1320
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #ifndef XS_CONFIG_H
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 #define XS_CONFIG_H
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #ifdef __cplusplus
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 extern "C" {
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #endif
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 * Configuration structure
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 */
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 69
diff changeset
13 enum XS_ENG {
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 69
diff changeset
14 XS_ENG_SIDPLAY1,
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
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
20 enum XS_RES {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
21 XS_RES_8BIT = 8,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
22 XS_RES_16BIT = 16,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
23 XS_RES_24BIT = 24
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
24 };
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
25
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
26 enum XS_CHN {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
27 XS_CHN_MONO = 1,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
28 XS_CHN_STEREO = 2,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
29 XS_CHN_AUTOPAN = 3
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
33 enum XS_CLOCK {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
34 XS_CLOCK_PAL = 1,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
35 XS_CLOCK_NTSC
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
39 enum XS_EMUENGINE {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
40 XS_SIDPLAY1 = 1,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
41 XS_SIDPLAY2
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 extern struct t_xs_cfg {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
54 /* General audio settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
55 gint fmtBitsPerSample;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
56 gint fmtChannels;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
57 gint fmtFrequency;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
59 /* General libSIDPlay settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
60 gboolean mos8580; /* TRUE = 8580, FALSE = 6581 */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
61 gboolean emulateFilters;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
62 gfloat filterFs;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
63 gfloat filterFm;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
64 gfloat filterFt;
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
65 gint memoryMode; /* See XS_MPU-constants */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
66 gint clockSpeed; /* PAL (50Hz) or NTSC (60Hz) */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
67 gboolean forceSpeed; /* TRUE = force to given clockspeed */
64
d3bb914e3af3 Fixes for sidplay2 stuff
Matti Hamalainen <ccr@tnsp.org>
parents: 57
diff changeset
68 gboolean optimiseLevel; /* SIDPlay2 emulation optimization */
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
69 gboolean oversampleEnable;
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
70 gint oversampleFactor; /* Factor of oversampling */
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
72 /* Playing settings */
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
73 gboolean playMaxTimeEnable;
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
74 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
75 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
76 gboolean songlenDBEnable;
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
77 gchar *songlenDBPath; /* Path to Songlengths.txt */
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78
69
bf6a524cf7ca Fixes, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
79 gboolean silenceEnable; /* Silence detection */
bf6a524cf7ca Fixes, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
80 gint silenceMinTime;
bf6a524cf7ca Fixes, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
81 gint silenceMaxCheck;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
83 /* Miscellaneous settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
84 gboolean stilDBEnable;
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
85 gchar *stilDBPath; /* Path to STIL.txt */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
86
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
87 gboolean detectMagic;
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
88 gboolean alwaysRaise;
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
89
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
90 gboolean titleOverride; /* TRUE if XMMS titles are overriden */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
91 gchar *titleFormat;
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 69
diff changeset
92
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 69
diff changeset
93 gint playerEngine;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 } xs_cfg;
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 * Configuration-file
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 enum {
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
101 CTYPE_INT = 1,
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
102 CTYPE_FLOAT,
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
103 CTYPE_STR,
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
104 CTYPE_BOOL
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
105 };
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
106
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
107 enum {
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
108 WTYPE_BGROUP = 1,
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
109 WTYPE_SPIN,
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
110 WTYPE_SCALE,
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
111 WTYPE_BUTTON,
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
112 WTYPE_TEXT
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 typedef struct {
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
117 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
118 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
119 gchar *valName; /* Name of configuration item */
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 } t_xs_cfg_item;
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122
57
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
123 typedef struct {
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
124 gint widType;
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
125 gint valType;
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
126 gchar *widName;
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
127 void *valData;
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
128 gint valSet;
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
129 } t_xs_wid_item;
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
130
85811bcd049e Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
131
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133 * Functions
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134 */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 void xs_configure(void);
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
136 void xs_read_configuration(void);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
137 gint xs_write_configuration(void);
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 #ifdef __cplusplus
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 }
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142 #endif
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143 #endif /* XS_CONFIG_H */