annotate src/sid/xmms-sid.h @ 2772:fea021087241

enable lirc reconnect by default
author Andrew O. Shadoura <bugzilla@tut.by>
date Mon, 09 Jun 2008 21:40:22 +0300
parents 7086be3a058d
children 251336bee085
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
1 /*
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
3
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
4 Main header file
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
5
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
6 Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org>
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
7 (C) Copyright 1999-2007 Tecnic Software productions (TNSP)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
8
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
9 This program is free software; you can redistribute it and/or modify
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
10 it under the terms of the GNU General Public License as published by
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
11 the Free Software Foundation; either version 2 of the License, or
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
12 (at your option) any later version.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
13
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
14 This program is distributed in the hope that it will be useful,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
17 GNU General Public License for more details.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
18
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
19 You should have received a copy of the GNU General Public License along
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
20 with this program; if not, write to the Free Software Foundation, Inc.,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
22 */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
23 #ifndef XMMS_SID_H
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
24 #define XMMS_SID_H
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
25
1801
7086be3a058d sid -> new buildsys
Jonathan Schleifer <js@h3c.de>
parents: 1746
diff changeset
26 #include <config.h>
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
27 #include "xs_support.h"
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
28
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
29 #ifdef __cplusplus
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
30 extern "C" {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
31 #endif
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
32
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
33 /*
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
34 * Some constants and defines
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
35 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
36 /* #define to enable spurious debugging messages for development
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
37 * purposes. Output goes to stderr. See also DEBUG_NP below.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
38 */
1591
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
39 #undef DEBUG
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
40
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
41 /* Define to ISO C99 macro for debugging instead of varargs function.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
42 * This provides more useful information, but is incompatible with
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
43 * older standards. If #undef'd, a varargs function is used instead.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
44 */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
45 #define DEBUG_NP
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
46
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
47 /* Define to enable non-portable thread and mutex debugging code.
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
48 * You need to #define DEBUG also to make this useful.
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
49 * (Works probably with GNU/Linux pthreads implementation only)
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
50 */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
51 #undef XS_MUTEX_DEBUG
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
52
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
53 /* HardSID-support is not working and is untested, thus we disable it here.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
54 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
55 #undef HAVE_HARDSID_BUILDER
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
56
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
57 /* Size for some small buffers (always static variables) */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
58 #define XS_BUF_SIZE (1024)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
59
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
60 /* If defined, some dynamically allocated temp. buffers are used.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
61 * Static (#undef) might give slight performance gain,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
62 * but fails on systems with limited stack space. */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
63 #define XS_BUF_DYNAMIC
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
64
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
65 /* Configuration section identifier
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
66 */
1581
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1577
diff changeset
67 #define XS_PACKAGE_STRING "Audacious-SID"
1573
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
68 #define XS_CONFIG_IDENT "sid"
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
69
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
70 /* Default audio rendering frequency in Hz
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
71 */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
72 #define XS_AUDIO_FREQ (44100)
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
73
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
74 /* Size of audio buffer. If you are experiencing lots of audio
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
75 * "underruns" or clicks/gaps in output, try increasing this value.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
76 * Do notice, however, that it also affects the update frequency of
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
77 * XMMS's visualization plugins...
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
78 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
79 #define XS_AUDIOBUF_SIZE (2*1024)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
80
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
81 /* Size of data buffer used for SID-tune MD5 hash calculation.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
82 * If this is too small, the computed hash will be incorrect.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
83 * Largest SID files I've seen are ~70kB. */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
84 #define XS_SIDBUF_SIZE (80*1024)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
85
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
86 /* libSIDPlay1/2 constants (copied from internal headers/source)
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
87 * For some stupid reason these are not available in public
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
88 * headers, so we have to duplicate them here...
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
89 */
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
90 #define XS_SIDPLAY1_FS (400.0f)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
91 #define XS_SIDPLAY1_FM (60.0f)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
92 #define XS_SIDPLAY1_FT (0.05f)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
93
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
94 #define XS_SIDPLAY2_NFPOINTS (0x800)
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
95 #define XS_SIDPLAY2_FMAX (24000)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
96
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
97 /* Limits for oversampling
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
98 */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
99 #define XS_MIN_OVERSAMPLE (2)
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
100 #define XS_MAX_OVERSAMPLE (8)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
101
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
102
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
103 /* Macros for mutexes and threads. These exist to be able to
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
104 * easily change from pthreads to glib threads, etc, if necessary.
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
105 */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
106 #define XS_THREAD_T GThread *
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
107 #define XS_THREAD_EXIT(M) g_thread_exit(M)
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
108 #define XS_THREAD_JOIN(M) g_thread_join(M)
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
109 #define XS_MPP(M) M ## _mutex
1591
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
110 #define XS_MUTEX(M) GStaticMutex XS_MPP(M) = G_STATIC_MUTEX_INIT
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
111 #define XS_MUTEX_H(M) extern GStaticMutex XS_MPP(M)
1591
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
112 #ifdef XS_MUTEX_DEBUG
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
113 # define XS_MUTEX_LOCK(M) { \
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
114 gboolean tmpRes; \
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
115 XSDEBUG("XS_MUTEX_TRYLOCK(" #M ")\n"); \
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
116 tmpRes = g_static_mutex_trylock(&XS_MPP(M)); \
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
117 XSDEBUG("[" #M "] = %s\n", tmpRes ? "TRUE" : "FALSE"); \
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
118 }
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
119 # define XS_MUTEX_UNLOCK(M) { XSDEBUG("XS_MUTEX_UNLOCK(" #M ")\n"); g_static_mutex_unlock(&XS_MPP(M)); }
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
120 #else
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
121 # define XS_MUTEX_LOCK(M) g_static_mutex_lock(&XS_MPP(M))
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
122 # define XS_MUTEX_UNLOCK(M) g_static_mutex_unlock(&XS_MPP(M))
fccf78344cab Undefine DEBUG, it is probably not needed at the moment; Made mutex debugging
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
123 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
124
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
125 /* Character set conversion helper macros
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
126 */
1573
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
127 #define XS_CS_FILENAME(M) g_filename_to_utf8(M, -1, NULL, NULL, NULL)
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
128 #define XS_CS_SID(M) g_convert(M, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL)
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
129 #define XS_CS_STIL(M) g_convert(M, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL)
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
130 #define XS_CS_FREE(M) g_free(M)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
131
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
132 /* Shorthands for linked lists
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
133 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
134 #define LPREV (pNode->pPrev)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
135 #define LTHIS (pNode)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
136 #define LNEXT (pNode->pNext)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
137
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
138
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
139 /* Plugin-wide typedefs
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
140 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
141 typedef struct {
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
142 gint tuneSpeed,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
143 tuneLength;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
144 gboolean tunePlayed;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
145 } t_xs_subtuneinfo;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
146
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
147
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
148 typedef struct {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
149 gchar *sidFilename,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
150 *sidName,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
151 *sidComposer,
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
152 *sidCopyright,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
153 *sidFormat;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
154 gint loadAddr,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
155 initAddr,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
156 playAddr,
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
157 dataFileLen,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
158 sidModel;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
159 gint nsubTunes, startTune;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
160 t_xs_subtuneinfo *subTunes;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
161 } t_xs_tuneinfo;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
162
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
163
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
164 /* Global variables
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
165 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
166 extern InputPlugin xs_plugin_ip;
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
167
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
168
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
169 /* Plugin function prototypes
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
170 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
171 void xs_init(void);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
172 void xs_reinit(void);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
173 void xs_close(void);
561
914c96de3244 [svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents: 463
diff changeset
174 void xs_play_file(InputPlayback *);
914c96de3244 [svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents: 463
diff changeset
175 void xs_stop(InputPlayback *);
914c96de3244 [svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents: 463
diff changeset
176 void xs_pause(InputPlayback *, short);
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
177 void xs_seek(InputPlayback *, gint);
561
914c96de3244 [svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents: 463
diff changeset
178 gint xs_get_time(InputPlayback *);
1564
5e4393a4c099 Start of major Aud-SID Tuples vs XMMS-SID cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 1563
diff changeset
179 Tuple * xs_get_song_tuple(gchar *);
1732
4bdb8621853e - updated sid plugin to use subsong-num and subsong-id
Giacomo Lozito <james@develia.org>
parents: 1591
diff changeset
180 Tuple * xs_probe_for_tuple(gchar *, t_xs_file *);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
181 void xs_about(void);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
182
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
183 void xs_error(const char *, ...);
1581
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1577
diff changeset
184 gboolean xs_get_trackinfo(const gchar *, gchar **, gint *);
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
185
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
186
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
187 /* Debugging
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
188 */
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
189 #ifndef DEBUG_NP
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
190 void XSDEBUG(const char *, ...);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
191 #else
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
192 # ifdef DEBUG
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
193 # define XSDEBUG(...) { fprintf(stderr, "XS[%s:%s:%d]: ", __FILE__, __FUNCTION__, (int) __LINE__); fprintf(stderr, __VA_ARGS__); }
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
194 # else
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
195 # define XSDEBUG(...) /* stub */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
196 # endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
197 #endif
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
198
1573
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
199
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
200 /* And even some Gtk+ macro crap here, yay.
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
201 */
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
202 #define XS_DEF_WINDOW_DELETE(ME, MV) \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
203 gboolean xs_ ## ME ## _delete(GtkWidget *w, GdkEvent *e, gpointer d) { \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
204 (void) w; (void) e; (void) d; \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
205 if (xs_ ## MV ) { \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
206 gtk_widget_destroy(xs_ ## MV ); \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
207 xs_ ## MV = NULL; \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
208 } \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
209 return FALSE; \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
210 }
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
211
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
212 #define XS_DEF_WINDOW_CLOSE(ME, MV) \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
213 void xs_ ## ME (GtkButton *b, gpointer d) { \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
214 (void) b; (void) d; \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
215 gtk_widget_destroy(xs_ ## MV ); \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
216 xs_ ## MV = NULL; \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
217 }
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
218
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
219 #define XS_SIGNAL_CONNECT(SOBJ, SNAME, SFUNC, SDATA) \
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
220 g_signal_connect(G_OBJECT(SOBJ), SNAME, G_CALLBACK(SFUNC), SDATA)
82548d92c922 Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents: 1564
diff changeset
221
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
222 #ifdef __cplusplus
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
223 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
224 #endif
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 561
diff changeset
225 #endif /* XMMS_SID_H */