Mercurial > hg > xmms-sid
annotate src/xmms-sid.h @ 101:4614f58ab169 dev-0_8_0b6
Paskaa
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 11 Jan 2004 01:25:01 +0000 |
parents | 426e443240b8 |
children | fe83646e6baa |
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 */ | |
92
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
23 #ifndef _XMMS_SID_H |
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
24 #define _XMMS_SID_H |
1 | 25 |
26 #ifdef __cplusplus | |
27 extern "C" { | |
28 #endif | |
29 | |
92
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
30 #ifdef HAVE_CONFIG_H |
24 | 31 #include <config.h> |
92
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
32 #endif |
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
33 #ifdef HAVE_ASSERT_H |
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
34 #include <assert.h> |
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
35 #else |
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
36 #define assert(x) /* stub */ |
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
37 #endif |
1 | 38 #include <glib.h> |
39 #include <xmms/plugin.h> | |
40 | |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
41 /* |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
42 * Some defines |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
43 */ |
100 | 44 #define DEBUG |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
45 #undef HAVE_HARDSID_BUILDER /* HardSID-support is not working and is untested */ |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
46 |
1 | 47 /* |
3 | 48 * Generals |
1 | 49 */ |
24 | 50 #define XS_BUFSIZE (4096) /* Size for some buffers */ |
1 | 51 |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
52 #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
|
53 #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
|
54 |
92
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
55 #define XS_STIL_MAXENTRY (128) /* 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
|
56 |
62
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
57 #define XS_MIN_OVERSAMPLE (2) /* Minimum oversampling factor */ |
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
58 #define XS_MAX_OVERSAMPLE (8) /* Maximum oversampling factor */ |
1 | 59 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
60 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
|
61 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
62 |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
63 typedef struct { |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
64 gint tuneSpeed; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
65 gint tuneLength; |
87
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
66 gchar *tuneTitle; |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
67 } t_xs_subtune; |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
68 |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
69 |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
70 typedef struct { |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
71 gchar *tuneFilename; |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
72 gint nsubTunes, startTune; |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
73 t_xs_subtune subTunes[XS_STIL_MAXENTRY]; |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
74 } t_xs_tune; |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
75 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
76 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
77 typedef struct { |
73
2bc607888f53
Added libsidplay2 module, lots of reworking of internals, sidplay1 support
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
78 void *player; |
87
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
79 gboolean isError, isPlaying; |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
80 gint currSong; |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
81 t_xs_tune *pTune; |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
82 } t_xs_status; |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
83 |
87
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
84 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
85 extern t_xs_status xs_status; |
1 | 86 |
87 | |
88 /* | |
3 | 89 * Plugin function prototypes |
1 | 90 */ |
91 void xs_init(void); | |
3 | 92 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
|
93 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
|
94 void xs_play_file(gchar *); |
1 | 95 void xs_stop(void); |
96 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
|
97 void xs_seek(gint); |
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
98 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
|
99 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
|
100 //void xs_file_info_box(gchar *); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
101 void xs_about(void); |
1 | 102 |
87
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
103 t_xs_tune *xs_tune_new(gchar *, gint, gint); |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
104 void xs_tune_free(t_xs_tune *); |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
105 |
1 | 106 |
107 /* | |
108 * Debugging and error handling macros | |
109 */ | |
110 #ifdef DEBUG | |
101 | 111 #define XSDEBUG(x...) { fprintf(stderr, "XS[%s:%d]: ", __FILE__, (int) __LINE__); fprintf(stderr, ## x); } |
1 | 112 #else |
113 #define XSDEBUG(x...) /* foo */ | |
114 #endif | |
115 | |
24 | 116 #define XSERR(x...) { fprintf(stderr, PACKAGE_NAME ": "); fprintf(stderr, ## x); } |
1 | 117 |
118 | |
119 #ifdef __cplusplus | |
120 } | |
121 #endif | |
92
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
122 #endif /* _XMMS_SID_H */ |