Mercurial > hg > xmms-sid
annotate src/xmms-sid.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 | ab522ab65c85 |
rev | line source |
---|---|
1 | 1 /* |
3 | 2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) |
1 | 3 |
4 Main header file | |
5 | |
3 | 6 Written by Matti "ccr" Hamalainen <ccr@tnsp.org> |
1 | 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 */ | |
3 | 23 #define DEBUG |
1 | 24 |
3 | 25 #ifndef XMMS_SID_H |
26 #define XMMS_SID_H | |
1 | 27 |
28 #ifdef __cplusplus | |
29 extern "C" { | |
30 #endif | |
31 | |
24 | 32 #include <config.h> |
1 | 33 #include <glib.h> |
34 #include <xmms/plugin.h> | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
35 #include <assert.h> |
1 | 36 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
37 |
1 | 38 /* |
3 | 39 * Generals |
1 | 40 */ |
24 | 41 #define XS_BUFSIZE (4096) /* Size for some buffers */ |
1 | 42 |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
43 #define XS_CONFIG_IDENT "XMMS-SID" /* Configuration file identifier */ |
62
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
44 #define XS_CONFIG_FILE "/.xmms/xmms-sid" /* Use this configfile if autocyrpe fails */ |
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
45 |
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
46 #define XS_STIL_MAXENTRY (48) /* Max number of sub-songs in STIL/SLDB node */ |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
47 |
62
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
48 #define XS_MIN_OVERSAMPLE (2) /* Minimum oversampling factor */ |
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
49 #define XS_MAX_OVERSAMPLE (8) /* Maximum oversampling factor */ |
1 | 50 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
51 extern InputPlugin xs_plugin_ip; /* XMMS-SID plugin structure */ |
62
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
52 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
53 |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
54 typedef struct { |
73
2bc607888f53
Added libsidplay2 module, lots of reworking of internals, sidplay1 support
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
55 void *player; |
2bc607888f53
Added libsidplay2 module, lots of reworking of internals, sidplay1 support
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
56 gboolean isError, isPlaying, allowNext; |
2bc607888f53
Added libsidplay2 module, lots of reworking of internals, sidplay1 support
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
57 gint currSong, nSongs; |
2bc607888f53
Added libsidplay2 module, lots of reworking of internals, sidplay1 support
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
58 gchar *currFileName; |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
59 } t_xs_status; |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
60 |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
61 extern t_xs_status xs_status; |
1 | 62 |
63 | |
64 /* | |
3 | 65 * Plugin function prototypes |
1 | 66 */ |
67 void xs_init(void); | |
3 | 68 void xs_close(void); |
65
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
69 gint xs_is_our_file(gchar *); |
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
70 void xs_play_file(gchar *); |
1 | 71 void xs_stop(void); |
72 void xs_pause(short); | |
65
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
73 void xs_seek(gint); |
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
74 gint xs_get_time(void); |
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
75 void xs_get_song_info(gchar *, gchar **, gint *); |
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
76 //void xs_file_info_box(gchar *); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
77 void xs_about(void); |
1 | 78 |
79 | |
80 /* | |
81 * Debugging and error handling macros | |
82 */ | |
83 #ifdef DEBUG | |
84 #define XSDEBUG(x...) { fprintf(stderr, "XSDEBUG [%s:%d]: ", __FILE__, (int) __LINE__); fprintf(stderr, ## x); } | |
85 #else | |
86 #define XSDEBUG(x...) /* foo */ | |
87 #endif | |
88 | |
24 | 89 #define XSERR(x...) { fprintf(stderr, PACKAGE_NAME ": "); fprintf(stderr, ## x); } |
1 | 90 |
91 | |
92 #ifdef __cplusplus | |
93 } | |
94 #endif | |
3 | 95 #endif /* XMMS_SID_H */ |