comparison src/xmms-sid.h @ 1:183e7cbc1036

Initial revision
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 03 Jun 2003 10:23:04 +0000
parents
children 279b1e12df2b
comparison
equal deleted inserted replaced
0:5ce0a94edc2e 1:183e7cbc1036
1 /*
2 xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
3
4 Main header file
5
6 Written by Matti "ccr" Hamalainen <mhamalai@ratol.fi>
7 (few bits may still be by Willem Monsuwe)
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23 /*
24 #define DEBUG
25 */
26
27 #ifndef _XMMS_SID_H
28 #define _XMMS_SID_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <glib.h>
35 #include <xmms/plugin.h>
36
37 extern InputPlugin xmms_sid_ip;
38
39 /*
40 * Configuration structure
41 */
42 #define XMMS_SID_CONFIG_IDENT "XMMS-SID"
43 #define XMMS_SID_BUFSIZE 4096
44 #define XMMS_SID_NAME "xmms-sid"
45
46 #define XMMS_SID_CHN_MONO 0
47 #define XMMS_SID_CHN_STEREO 1
48 #define XMMS_SID_CHN_AUTOPAN 2
49
50 #define XMMS_SID_CLOCK_PAL 1
51 #define XMMS_SID_CLOCK_NTSC 2
52
53 #define XMMS_SID_DEFAULT_FILTERFS 400.0
54 #define XMMS_SID_DEFAULT_FILTERFM 60.0
55 #define XMMS_SID_DEFAULT_FILTERFT 0.05
56
57 #define XMMS_SID_MPU_BANK_SWITCHING 1
58 #define XMMS_SID_MPU_TRANSPARENT_ROM 2
59 #define XMMS_SID_MPU_PLAYSID_ENVIRONMENT 3
60
61 extern struct T_sid_cfg {
62 gint bitsPerSample;
63 gint channels;
64 gint frequency;
65 gboolean mos8580;
66 gboolean emulateFilter;
67 gfloat filterFs;
68 gfloat filterFm;
69 gfloat filterFt;
70 gint memoryMode;
71 gint clockSpeed;
72 gboolean forceSpeed;
73 gboolean detectMagic;
74 gboolean usestil;
75 gchar *stilpath;
76 gchar *fileInfo;
77 } xs_cfg;
78
79
80 /*
81 * Configuration specific stuff
82 */
83 enum {
84 ATYPE_INT = 1,
85 ATYPE_FLOAT,
86 ATYPE_STR,
87 ATYPE_BOOL
88 };
89
90
91 typedef struct {
92 int atype;
93 void *adata;
94 gchar *aname;
95 } T_sid_cfg_entry;
96
97
98 /*
99 * General plugin function prototypes
100 */
101 void xs_init(void);
102 int xs_is_our_file(char *);
103 void xs_play_file(char *);
104 void xs_stop(void);
105 void xs_pause(short);
106 void xs_seek(int);
107 int xs_get_time(void);
108 void xs_get_song_info(char *, char **, int *);
109 void xs_file_info_box(char *);
110 void xs_configure(void);
111 void xs_get_configure(void);
112 void xs_aboutbox(void);
113 int xs_stil_get(gchar *);
114
115 int xs_strcalloc(gchar **, gchar *);
116 void xs_stil_clear(void);
117
118 /*
119 * STIL information specific
120 */
121 #define XMMS_SID_STIL_MAXENTRY 64
122
123 typedef struct {
124 gchar *title;
125 gchar *name;
126 gchar *artist;
127 gchar *comment;
128 } T_sid_stil_subtune;
129
130
131 extern struct T_sid_stil_info {
132 T_sid_stil_subtune subtune[XMMS_SID_STIL_MAXENTRY];
133 } xs_stil_info;
134
135
136 /*
137 * Debugging and error handling macros
138 */
139 #ifdef DEBUG
140 #define XSDEBUG(x...) { fprintf(stderr, "XSDEBUG [%s:%d]: ", __FILE__, (int) __LINE__); fprintf(stderr, ## x); }
141 #else
142 #define XSDEBUG(x...) /* foo */
143 #endif
144
145 #define XSERR(x...) { fprintf(stderr, XMMS_SID_NAME ": "); fprintf(stderr, ## x); }
146
147
148 #ifdef __cplusplus
149 }
150 #endif
151 #endif /* _XMMS_SID_H */