annotate src/xs_config.h @ 40:1788f4ce6a44

Numerous changes towards 0.8
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 19 Jun 2003 22:38:01 +0000
parents 271be59be975
children 90cd38b28a72
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
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
8 #include <xmms-sid.h>
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
9
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
10 /*
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
11 * Constants
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
12 */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
13 #define XS_CONFIG_IDENT "XMMS-SID" /* Configuration file identifier */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
14 #define XS_CONFIG_FILE "/.xmms/config"
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
15
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 * Configuration structure
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
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,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
48 XS_MPU_PLAYSID_ENVIRONMENT
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 };
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 extern struct t_xs_cfg {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
53 /* General audio settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
54 gint fmtBitsPerSample;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
55 gint fmtChannels;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
56 gint fmtFrequency;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57
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;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
65 gint memoryMode;
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 */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
68
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
69 gboolean oversampleEnable; /* TRUE = oversample */
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
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
73 /* Playing settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
74 gboolean playMaxTimeEnable; /* TRUE = use MAX playtime */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
75 gint playMaxTime; /* MAX playtime in seconds */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
76 gboolean songlenDBEnable;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
77 gchar *songlenDBPath;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
80 /* Miscellaneous settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
81 gboolean stilDBEnable;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
82 gchar *stilDBPath;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
83
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
84 gboolean detectMagic;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
85
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
86 gboolean titleOverride;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
87 gchar *titleFormat;
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 } xs_cfg;
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 * Configuration-file
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 enum {
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 ATYPE_INT = 1,
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 ATYPE_FLOAT,
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 ATYPE_STR,
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 ATYPE_BOOL
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 };
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 typedef struct {
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 gint atype; /* Type of item (ATYPE_*) */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 void *adata; /* Pointer to variable */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 gchar *aname; /* Name of configuration item */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 } t_xs_cfg_item;
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 /*
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 * Functions
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 */
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 void xs_configure(void);
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
113 void xs_read_configuration(void);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
114 gint xs_write_configuration(void);
20
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 #ifdef __cplusplus
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 }
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 #endif
5caef90c4ffd Added paski
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 #endif /* XS_CONFIG_H */