Mercurial > hg > xmms-sid
annotate src/xmms-sid.h @ 478:22cd8161c9e7
Cosmetics
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 26 Jan 2007 12:54:01 +0000 |
parents | ba98fdac6307 |
children | 4c599be2d349 |
rev | line source |
---|---|
1 | 1 /* |
3 | 2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) |
1 | 3 |
4 Main header file | |
5 | |
324 | 6 Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org> |
422 | 7 (C) Copyright 1999-2007 Tecnic Software productions (TNSP) |
1 | 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 | |
412
7f694e5a1493
Updated GNU GPL (new FSF address) and some cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
19 You should have received a copy of the GNU General Public License along |
7f694e5a1493
Updated GNU GPL (new FSF address) and some cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
20 with this program; if not, write to the Free Software Foundation, Inc., |
7f694e5a1493
Updated GNU GPL (new FSF address) and some cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
1 | 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 |
465
ba98fdac6307
Moved some things to xs_support.h; t_xs_subtuneinfo.tuneSpeed is now the
Matti Hamalainen <ccr@tnsp.org>
parents:
459
diff
changeset
|
26 #include "xs_support.h" |
230 | 27 #include <pthread.h> |
1 | 28 |
230 | 29 #ifdef __cplusplus |
30 extern "C" { | |
31 #endif | |
32 | |
434 | 33 /* |
34 * Standard gettext macros. | |
35 */ | |
36 #ifdef ENABLE_NLS | |
37 # include <libintl.h> | |
38 # undef _ | |
39 # define _(String) dgettext (PACKAGE, String) | |
40 # ifdef gettext_noop | |
41 # define N_(String) gettext_noop (String) | |
42 # else | |
43 # define N_(String) (String) | |
44 # endif | |
45 #else | |
46 # define textdomain(String) (String) | |
47 # define gettext(String) (String) | |
48 # define dgettext(Domain,Message) (Message) | |
49 # define dcgettext(Domain,Message,Type) (Message) | |
50 # define bindtextdomain(Domain,Directory) (Domain) | |
51 # define _(String) (String) | |
52 # define N_(String) (String) | |
53 #endif | |
54 | |
55 | |
328 | 56 #include <xmms/plugin.h> |
57 | |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
58 /* |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
59 * Some constants and defines |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
60 */ |
365
5a92a2aee74c
Better comments and .. you guessed it: more indentation fixes. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
61 /* #define to enable spurious debugging messages for development |
5a92a2aee74c
Better comments and .. you guessed it: more indentation fixes. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
62 * purposes. Output goes to stderr. See also DEBUG_NP below. |
5a92a2aee74c
Better comments and .. you guessed it: more indentation fixes. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
63 */ |
478 | 64 //#define DEBUG |
300 | 65 |
66 /* Define to ISO C99 macro for debugging instead of varargs function. | |
365
5a92a2aee74c
Better comments and .. you guessed it: more indentation fixes. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
67 * This provides more useful information, but is incompatible with |
5a92a2aee74c
Better comments and .. you guessed it: more indentation fixes. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
68 * older standards. If #undef'd, a varargs function is used instead. |
300 | 69 */ |
308
ae5795ba5c77
Remove "only when song-length unknown" option from minimum playtime, it
Matti Hamalainen <ccr@tnsp.org>
parents:
300
diff
changeset
|
70 #define DEBUG_NP |
230 | 71 |
272 | 72 /* Define to enable non-portable thread and mutex debugging code. |
300 | 73 * You need to #define DEBUG also to make this useful. |
74 * (Works probably with GNU/Linux pthreads implementation only) | |
272 | 75 */ |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
76 #undef XS_MUTEX_DEBUG |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
77 |
272 | 78 /* HardSID-support is not working and is untested, thus we disable it here. |
79 */ | |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
80 #undef HAVE_HARDSID_BUILDER |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
81 |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
82 /* Size for some small buffers (always static variables) */ |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
83 #define XS_BUF_SIZE (1024) |
1 | 84 |
355
26079ab52fc3
Comment about XS_DYNAMIC_BUF changed
Matti Hamalainen <ccr@tnsp.org>
parents:
334
diff
changeset
|
85 /* If defined, some dynamically allocated temp. buffers are used. |
26079ab52fc3
Comment about XS_DYNAMIC_BUF changed
Matti Hamalainen <ccr@tnsp.org>
parents:
334
diff
changeset
|
86 * Static (#undef) might give slight performance gain, |
26079ab52fc3
Comment about XS_DYNAMIC_BUF changed
Matti Hamalainen <ccr@tnsp.org>
parents:
334
diff
changeset
|
87 * but fails on systems with limited stack space. */ |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
88 #define XS_BUF_DYNAMIC |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
89 |
242 | 90 /* Size of audio buffer. If you are experiencing lots of audio |
91 * "underruns" or clicks/gaps in output, try increasing this value. | |
92 * Do notice, however, that it also affects the update frequency of | |
93 * XMMS's visualization plugins... | |
94 */ | |
95 #define XS_AUDIOBUF_SIZE (2*1024) | |
230 | 96 |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
97 /* Size of data buffer used for SID-tune MD5 hash calculation. |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
98 * If this is too small, the computed hash will be incorrect. |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
99 * Largest SID files I've seen are ~70kB. */ |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
100 #define XS_SIDBUF_SIZE (80*1024) |
230 | 101 |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
102 |
376
b20300813b42
Moved some #defines from xs_config.c to xmms-sid.h; Changed default SID
Matti Hamalainen <ccr@tnsp.org>
parents:
369
diff
changeset
|
103 /* libSIDPlay1 default filter values (copied from libsidplay1's headers) */ |
b20300813b42
Moved some #defines from xs_config.c to xmms-sid.h; Changed default SID
Matti Hamalainen <ccr@tnsp.org>
parents:
369
diff
changeset
|
104 #define XS_SIDPLAY1_FS (400.0f) |
b20300813b42
Moved some #defines from xs_config.c to xmms-sid.h; Changed default SID
Matti Hamalainen <ccr@tnsp.org>
parents:
369
diff
changeset
|
105 #define XS_SIDPLAY1_FM (60.0f) |
b20300813b42
Moved some #defines from xs_config.c to xmms-sid.h; Changed default SID
Matti Hamalainen <ccr@tnsp.org>
parents:
369
diff
changeset
|
106 #define XS_SIDPLAY1_FT (0.05f) |
b20300813b42
Moved some #defines from xs_config.c to xmms-sid.h; Changed default SID
Matti Hamalainen <ccr@tnsp.org>
parents:
369
diff
changeset
|
107 |
b20300813b42
Moved some #defines from xs_config.c to xmms-sid.h; Changed default SID
Matti Hamalainen <ccr@tnsp.org>
parents:
369
diff
changeset
|
108 |
369
4611f1194941
Make binary search bailout value a #define in xmms-sid.h
Matti Hamalainen <ccr@tnsp.org>
parents:
365
diff
changeset
|
109 #define XS_BIN_BAILOUT (32) /* Binary search bailout treshold */ |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
110 |
230 | 111 |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
40
diff
changeset
|
112 #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
|
113 #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
|
114 |
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
115 #define XS_MIN_OVERSAMPLE (2) /* Minimum oversampling factor */ |
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
116 #define XS_MAX_OVERSAMPLE (8) /* Maximum oversampling factor */ |
1 | 117 |
230 | 118 |
119 /* Macros for mutexes and threads. These exist to be able to | |
120 * easily change from pthreads to glib threads, etc, if necessary. | |
121 */ | |
122 #define XS_MPP(M) M ## _mutex | |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
123 #if XS_MUTEX_DEBUG |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
124 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; int M ## _qq; |
293
3fa910269508
Remove extra semicolon from macro definition, #undef DEBUG
Matti Hamalainen <ccr@tnsp.org>
parents:
278
diff
changeset
|
125 #define XS_MUTEX_H(M) extern pthread_mutex_t XS_MPP(M); extern int M ## _qq |
230 | 126 #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); } |
127 #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); } | |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
128 #else |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
129 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_MUTEX_INITIALIZER |
293
3fa910269508
Remove extra semicolon from macro definition, #undef DEBUG
Matti Hamalainen <ccr@tnsp.org>
parents:
278
diff
changeset
|
130 #define XS_MUTEX_H(M) extern pthread_mutex_t XS_MPP(M) |
241
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
131 #define XS_MUTEX_LOCK(M) pthread_mutex_lock(&XS_MPP(M)) |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
132 #define XS_MUTEX_UNLOCK(M) pthread_mutex_unlock(&XS_MPP(M)) |
291715a519e2
Compile-time setting to enable/disable use of dynamically allocated buffers.
Matti Hamalainen <ccr@tnsp.org>
parents:
235
diff
changeset
|
133 #endif |
230 | 134 |
135 /* Shorthands for linked lists | |
136 */ | |
137 #define LPREV (pNode->pPrev) | |
138 #define LTHIS (pNode) | |
139 #define LNEXT (pNode->pNext) | |
62
0d1df20745dd
Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
140 |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
141 |
230 | 142 /* Plugin-wide typedefs |
143 */ | |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
144 typedef struct { |
465
ba98fdac6307
Moved some things to xs_support.h; t_xs_subtuneinfo.tuneSpeed is now the
Matti Hamalainen <ccr@tnsp.org>
parents:
459
diff
changeset
|
145 gint tuneSpeed, |
ba98fdac6307
Moved some things to xs_support.h; t_xs_subtuneinfo.tuneSpeed is now the
Matti Hamalainen <ccr@tnsp.org>
parents:
459
diff
changeset
|
146 tuneLength; |
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
376
diff
changeset
|
147 gboolean tunePlayed; |
230 | 148 } t_xs_subtuneinfo; |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
149 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
150 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
151 typedef struct { |
230 | 152 gchar *sidFilename, |
153 *sidName, | |
154 *sidComposer, | |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
394
diff
changeset
|
155 *sidCopyright, |
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
394
diff
changeset
|
156 *sidFormat; |
230 | 157 gint loadAddr, |
158 initAddr, | |
159 playAddr, | |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
394
diff
changeset
|
160 dataFileLen, |
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
394
diff
changeset
|
161 sidModel; |
230 | 162 gint nsubTunes, startTune; |
334 | 163 t_xs_subtuneinfo *subTunes; |
230 | 164 } t_xs_tuneinfo; |
165 | |
166 | |
167 struct t_xs_status; | |
168 | |
169 typedef struct { | |
170 gint plrIdent; | |
465
ba98fdac6307
Moved some things to xs_support.h; t_xs_subtuneinfo.tuneSpeed is now the
Matti Hamalainen <ccr@tnsp.org>
parents:
459
diff
changeset
|
171 gboolean (*plrIsOurFile)(t_xs_file *); |
230 | 172 gboolean (*plrInit)(struct t_xs_status *); |
173 void (*plrClose)(struct t_xs_status *); | |
174 gboolean (*plrInitSong)(struct t_xs_status *); | |
175 guint (*plrFillBuffer)(struct t_xs_status *, gchar *, guint); | |
176 gboolean (*plrLoadSID)(struct t_xs_status *, gchar *); | |
177 void (*plrDeleteSID)(struct t_xs_status *); | |
178 t_xs_tuneinfo* (*plrGetSIDInfo)(gchar *); | |
465
ba98fdac6307
Moved some things to xs_support.h; t_xs_subtuneinfo.tuneSpeed is now the
Matti Hamalainen <ccr@tnsp.org>
parents:
459
diff
changeset
|
179 gboolean (*plrUpdateSIDInfo)(struct t_xs_status *); |
230 | 180 } t_xs_player; |
181 | |
182 | |
183 typedef struct t_xs_status { | |
184 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
|
185 audioChannels, |
269 | 186 audioBitsPerSample, |
187 oversampleFactor; /* Factor of oversampling */ | |
295 | 188 AFormat audioFormat; |
269 | 189 gboolean oversampleEnable; /* TRUE after sidEngine initialization, |
190 if xs_cfg.oversampleEnable == TRUE and | |
191 emulation backend supports oversampling. | |
192 */ | |
230 | 193 void *sidEngine; /* SID-emulation internal engine data */ |
194 t_xs_player *sidPlayer; /* Selected player engine */ | |
459 | 195 gboolean isError, isPlaying, isInitialized; |
230 | 196 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
|
197 lastTime; |
445
f277dad3180f
Working on the localization and fixing up the breakage in song information
Matti Hamalainen <ccr@tnsp.org>
parents:
434
diff
changeset
|
198 |
230 | 199 t_xs_tuneinfo *tuneInfo; |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
200 } t_xs_status; |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
65
diff
changeset
|
201 |
87
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
202 |
230 | 203 /* Global variables |
204 */ | |
205 extern InputPlugin xs_plugin_ip; | |
206 | |
207 extern t_xs_status xs_status; | |
208 XS_MUTEX_H(xs_status); | |
1 | 209 |
210 | |
230 | 211 |
212 /* Plugin function prototypes | |
1 | 213 */ |
214 void xs_init(void); | |
147
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
138
diff
changeset
|
215 void xs_reinit(void); |
3 | 216 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
|
217 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
|
218 void xs_play_file(gchar *); |
1 | 219 void xs_stop(void); |
220 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
|
221 void xs_seek(gint); |
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
62
diff
changeset
|
222 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
|
223 void xs_get_song_info(gchar *, gchar **, gint *); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
224 void xs_about(void); |
1 | 225 |
445
f277dad3180f
Working on the localization and fixing up the breakage in song information
Matti Hamalainen <ccr@tnsp.org>
parents:
434
diff
changeset
|
226 |
459 | 227 t_xs_tuneinfo *xs_tuneinfo_new(const gchar * pcFilename, |
228 gint nsubTunes, gint startTune, const gchar * sidName, | |
229 const gchar * sidComposer, const gchar * sidCopyright, | |
230 gint loadAddr, gint initAddr, gint playAddr, | |
478 | 231 gint dataFileLen, const gchar *sidFormat, gint sidModel); |
230 | 232 void xs_tuneinfo_free(t_xs_tuneinfo *); |
87
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
233 |
394 | 234 void xs_error(const char *, ...); |
1 | 235 |
427
2ea3005a4b7f
Conditional #definition of _()
Matti Hamalainen <ccr@tnsp.org>
parents:
424
diff
changeset
|
236 |
2ea3005a4b7f
Conditional #definition of _()
Matti Hamalainen <ccr@tnsp.org>
parents:
424
diff
changeset
|
237 /* Debugging |
2ea3005a4b7f
Conditional #definition of _()
Matti Hamalainen <ccr@tnsp.org>
parents:
424
diff
changeset
|
238 */ |
300 | 239 #ifndef DEBUG_NP |
240 void XSDEBUG(const char *, ...); | |
241 #else | |
1 | 242 #ifdef DEBUG |
297 | 243 #define XSDEBUG(...) { fprintf(stderr, "XS[%s:%s:%d]: ", __FILE__, __FUNCTION__, (int) __LINE__); fprintf(stderr, __VA_ARGS__); } |
1 | 244 #else |
300 | 245 #define XSDEBUG(...) /* stub */ |
1 | 246 #endif |
300 | 247 #endif |
1 | 248 |
249 #ifdef __cplusplus | |
250 } | |
251 #endif | |
92
2607683bc9eb
Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
252 #endif /* _XMMS_SID_H */ |