annotate src/xmms-sid.h @ 235:d04191d1ea64

Add xs_fileinfo.h, move appropriate function prototypes there.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Dec 2004 13:34:02 +0000
parents 608f31f6c095
children 291715a519e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 Main header file
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
6 Written by Matti "ccr" Hamalainen <ccr@tnsp.org>
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 This program is free software; you can redistribute it and/or modify
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 the Free Software Foundation; either version 2 of the License, or
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 (at your option) any later version.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 This program is distributed in the hope that it will be useful,
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 GNU General Public License for more details.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 along with this program; if not, write to the Free Software
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 */
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
22 #ifndef _XMMS_SID_H
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
23 #define _XMMS_SID_H
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
25 #ifdef HAVE_CONFIG_H
24
271be59be975 Lots of changes
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
26 #include <config.h>
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
27 #endif
219
d18bf68d7bd9 Whitespace
Matti Hamalainen <ccr@tnsp.org>
parents: 147
diff changeset
28
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
29 #ifdef HAVE_ASSERT_H
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
30 #include <assert.h>
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
31 #else
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
32 #define assert(x) /* stub */
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
33 #endif
219
d18bf68d7bd9 Whitespace
Matti Hamalainen <ccr@tnsp.org>
parents: 147
diff changeset
34
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 #include <glib.h>
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
36 #include <pthread.h>
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 #include <xmms/plugin.h>
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
39 #ifdef __cplusplus
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
40 extern "C" {
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
41 #endif
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
42
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
43 /* Some defines
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
44 */
119
f4620b534861 Undefined debug for now.
Matti Hamalainen <ccr@tnsp.org>
parents: 111
diff changeset
45 #define DEBUG
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
46
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
47 #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
48
24
271be59be975 Lots of changes
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
49 #define XS_BUFSIZE (4096) /* Size for some buffers */
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
51 #define XS_SIDBUF_SIZE (80*1024) /* Size of data buffer used for SID-tune
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
52 MD5 hash calculation. If this is too small,
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
53 the computed hash will be incorrect.
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
54 Largest SID files I've seen are ~70kB.
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
55 */
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
56
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
57 #define XS_SIDBUF_DYNAMIC /* If not defined, static buffer is used.
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
58 Probably faster than allocating/deallocating
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
59 from heap, but fails on systems with limited
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
60 stack space.
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
61 */
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
62
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
63 #define XS_STIL_MAXENTRY (128) /* Max number of sub-songs in STIL/SLDB node */
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
64
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
65
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
66 #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
67 #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
68
0d1df20745dd Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
69 #define XS_MIN_OVERSAMPLE (2) /* Minimum oversampling factor */
0d1df20745dd Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
70 #define XS_MAX_OVERSAMPLE (8) /* Maximum oversampling factor */
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
72
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
73 /* Macros for mutexes and threads. These exist to be able to
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
74 * easily change from pthreads to glib threads, etc, if necessary.
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
75 */
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
76 #define XS_MPP(M) M ## _mutex
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
77 #ifdef DEBUG
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
78 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; int M ## _qq;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
79 #else
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
80 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_MUTEX_INITIALIZER
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
81 #endif
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
82 #define XS_MUTEX_H(M) extern pthread_mutex_t XS_MPP(M); extern int M ## _qq;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
83 #define XS_MUTEX_LOCK(M) { M ## _qq = pthread_mutex_lock(&XS_MPP(M)); if (M ## _qq) XSDEBUG("XS_MUTEX_LOCK(" #M ") == %i\n", M ## _qq); }
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
84 #define XS_MUTEX_UNLOCK(M) { M ## _qq = pthread_mutex_unlock(&XS_MPP(M)); if (M ## _qq) XSDEBUG("XS_MUTEX_UNLOCK(" #M ") == %i\n", M ## _qq); }
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
85
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
86 /* Shorthands for linked lists
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
87 */
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
88 #define LPREV (pNode->pPrev)
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
89 #define LTHIS (pNode)
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
90 #define LNEXT (pNode->pNext)
62
0d1df20745dd Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
91
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
92
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
93 /* Plugin-wide typedefs
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
94 */
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
95 typedef struct {
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
96 gint tuneSpeed;
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
97 gint tuneLength;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
98 gchar *tuneTitle;
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
99 } t_xs_subtuneinfo;
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
100
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
101
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
102 typedef struct {
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
103 gchar *sidFilename,
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
104 *sidName,
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
105 *sidComposer,
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
106 *sidCopyright;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
107 gint loadAddr,
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
108 initAddr,
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
109 playAddr,
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
110 dataFileLen;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
111 gint nsubTunes, startTune;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
112 t_xs_subtuneinfo subTunes[XS_STIL_MAXENTRY];
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
113 } t_xs_tuneinfo;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
114
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
115
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
116 struct t_xs_status;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
117
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
118 typedef struct {
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
119 gint plrIdent;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
120 gboolean (*plrIsOurFile)(gchar *);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
121 gboolean (*plrInit)(struct t_xs_status *);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
122 void (*plrClose)(struct t_xs_status *);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
123 gboolean (*plrInitSong)(struct t_xs_status *);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
124 guint (*plrFillBuffer)(struct t_xs_status *, gchar *, guint);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
125 gboolean (*plrLoadSID)(struct t_xs_status *, gchar *);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
126 void (*plrDeleteSID)(struct t_xs_status *);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
127 t_xs_tuneinfo* (*plrGetSIDInfo)(gchar *);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
128 } t_xs_player;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
129
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
130
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
131 typedef struct t_xs_status {
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
132 gint audioFrequency, /* Audio settings */
127
ddb513bd2610 Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents: 119
diff changeset
133 audioFormat,
ddb513bd2610 Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents: 119
diff changeset
134 audioChannels,
ddb513bd2610 Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents: 119
diff changeset
135 audioBitsPerSample;
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
136 void *sidEngine; /* SID-emulation internal engine data */
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
137 t_xs_player *sidPlayer; /* Selected player engine */
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
138 gboolean isError, isPlaying;
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
139 gint currSong, /* Current sub-tune */
132
4162a5370b9e Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents: 127
diff changeset
140 lastTime;
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
141 t_xs_tuneinfo *tuneInfo;
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
142 } t_xs_status;
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
143
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
144
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
145 /* Global variables
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
146 */
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
147 extern InputPlugin xs_plugin_ip;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
148
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
149 extern t_xs_status xs_status;
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
150 XS_MUTEX_H(xs_status);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
153
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
154 /* Plugin function prototypes
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155 */
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 void xs_init(void);
147
a7abcda7a86c SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents: 138
diff changeset
157 void xs_reinit(void);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
158 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
159 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
160 void xs_play_file(gchar *);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
161 void xs_stop(void);
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
162 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
163 void xs_seek(gint);
bf7b647b3239 The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
164 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
165 void xs_get_song_info(gchar *, gchar **, gint *);
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
166 void xs_about(void);
235
d04191d1ea64 Add xs_fileinfo.h, move appropriate function prototypes there.
Matti Hamalainen <ccr@tnsp.org>
parents: 230
diff changeset
167
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
169 t_xs_tuneinfo *xs_tuneinfo_new(gchar *, gint, gint, gchar *, gchar *, gchar *, gint, gint, gint, gint);
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
170 void xs_tuneinfo_free(t_xs_tuneinfo *);
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
171
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
172
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
173 /* Debugging and error handling macros
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
174 */
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
175 #ifdef DEBUG
230
608f31f6c095 Raw cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 219
diff changeset
176 #define XSDEBUG(x...) { fprintf(stderr, "XS[%s:%s:%d]: ", __FILE__, __FUNCTION__, (int) __LINE__); fprintf(stderr, ## x); }
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 #else
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 #define XSDEBUG(x...) /* foo */
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179 #endif
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180
24
271be59be975 Lots of changes
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
181 #define XSERR(x...) { fprintf(stderr, PACKAGE_NAME ": "); fprintf(stderr, ## x); }
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
182
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184 #ifdef __cplusplus
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
185 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
186 #endif
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
187 #endif /* _XMMS_SID_H */