annotate src/xs_config.h @ 50:dae6d3c2268d

Minor fixes, updated to support default XMMS configfile
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 21 Jun 2003 21:11:02 +0000
parents 90cd38b28a72
children 85811bcd049e
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 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
13 enum XS_RES {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
14 XS_RES_8BIT = 8,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
15 XS_RES_16BIT = 16,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
16 XS_RES_24BIT = 24
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
17 };
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
18
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
19 enum XS_CHN {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
20 XS_CHN_MONO = 1,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
21 XS_CHN_STEREO = 2,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
22 XS_CHN_AUTOPAN = 3
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
26 enum XS_CLOCK {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
27 XS_CLOCK_PAL = 1,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
28 XS_CLOCK_NTSC
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
32 enum XS_EMUENGINE {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
33 XS_SIDPLAY1 = 1,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
34 XS_SIDPLAY2
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
38 enum XS_MPU {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
39 XS_MPU_BANK_SWITCHING = 1,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
40 XS_MPU_TRANSPARENT_ROM,
44
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
41 XS_MPU_PLAYSID_ENVIRONMENT,
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
42 XS_MPU_REAL
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 extern struct t_xs_cfg {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
47 /* General audio settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
48 gint fmtBitsPerSample;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
49 gint fmtChannels;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
50 gint fmtFrequency;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
53 /* General libSIDPlay settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
54 gboolean mos8580; /* TRUE = 8580, FALSE = 6581 */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
55 gboolean emulateFilters;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
56 gfloat filterFs;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
57 gfloat filterFm;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
58 gfloat filterFt;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
59 gint memoryMode;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
60 gint clockSpeed; /* PAL (50Hz) or NTSC (60Hz) */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
61 gboolean forceSpeed; /* TRUE = force to given clockspeed */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
62
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
63 gboolean oversampleEnable; /* TRUE = oversample */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
64 gint oversampleFactor; /* Factor of oversampling */
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
67 /* Playing settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
68 gboolean playMaxTimeEnable; /* TRUE = use MAX playtime */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
69 gint playMaxTime; /* MAX playtime in seconds */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
70 gboolean songlenDBEnable;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
71 gchar *songlenDBPath;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
74 /* Miscellaneous settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
75 gboolean stilDBEnable;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
76 gchar *stilDBPath;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
77
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
78 gboolean detectMagic;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
79
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
80 gboolean titleOverride;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
81 gchar *titleFormat;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 } xs_cfg;
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 * Configuration-file
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87 */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 enum {
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 ATYPE_INT = 1,
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90 ATYPE_FLOAT,
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 ATYPE_STR,
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 ATYPE_BOOL
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 typedef struct {
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 gint atype; /* Type of item (ATYPE_*) */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 void *adata; /* Pointer to variable */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 gchar *aname; /* Name of configuration item */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 } t_xs_cfg_item;
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 * Functions
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 void xs_configure(void);
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
107 void xs_read_configuration(void);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
108 gint xs_write_configuration(void);
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 #ifdef __cplusplus
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 }
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 #endif
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 #endif /* XS_CONFIG_H */