Mercurial > audlegacy-plugins
annotate src/sid/xmms-sid.h @ 1574:e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
changing.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 03 Sep 2007 06:28:17 +0300 |
parents | 82548d92c922 |
children | bdf7935a2e26 |
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 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
26 #include "xs_support.h" |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
27 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
28 #ifdef __cplusplus |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
29 extern "C" { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
30 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
31 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
32 /* |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
33 * Some constants and defines |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
34 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
35 /* #define to enable spurious debugging messages for development |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
36 * 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
|
37 */ |
769 | 38 #undef DEBUG |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
39 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
40 /* 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
|
41 * This provides more useful information, but is incompatible with |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
42 * 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
|
43 */ |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
44 #define DEBUG_NP |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
45 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
46 /* 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
|
47 * 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
|
48 * (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
|
49 */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
50 #undef XS_MUTEX_DEBUG |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
51 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
52 /* 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
|
53 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
54 #undef HAVE_HARDSID_BUILDER |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
55 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
56 /* Size for some small buffers (always static variables) */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
57 #define XS_BUF_SIZE (1024) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
58 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
59 /* If defined, some dynamically allocated temp. buffers are used. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
60 * Static (#undef) might give slight performance gain, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
61 * but fails on systems with limited stack space. */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
62 #define XS_BUF_DYNAMIC |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
63 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
64 /* Configuration section identifier |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
65 */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
66 #define XS_PACKAGE_STRING "Audacious-SID v0.8.0beta18" |
1573
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
67 #define XS_CONFIG_IDENT "sid" |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
68 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
69 /* Default audio rendering frequency in Hz |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
70 */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
71 #define XS_AUDIO_FREQ (44100) |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
72 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
73 /* 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
|
74 * "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
|
75 * 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
|
76 * XMMS's visualization plugins... |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
77 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
78 #define XS_AUDIOBUF_SIZE (2*1024) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
79 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
80 /* 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
|
81 * 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
|
82 * Largest SID files I've seen are ~70kB. */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
83 #define XS_SIDBUF_SIZE (80*1024) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
84 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
85 /* 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
|
86 * 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
|
87 * 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
|
88 */ |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
89 #define XS_SIDPLAY1_FS (400.0f) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
90 #define XS_SIDPLAY1_FM (60.0f) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
91 #define XS_SIDPLAY1_FT (0.05f) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
92 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
93 #define XS_SIDPLAY2_NFPOINTS (0x800) |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
94 #define XS_SIDPLAY2_FMAX (24000) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
95 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
96 /* Limits for oversampling |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
97 */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
98 #define XS_MIN_OVERSAMPLE (2) |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
99 #define XS_MAX_OVERSAMPLE (8) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
100 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
101 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
102 /* 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
|
103 * 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
|
104 */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
105 #define XS_THREAD_T GThread * |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
106 #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
|
107 #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
|
108 #define XS_MPP(M) M ## _mutex |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
109 #define XS_MUTEX(M) GStaticMutex XS_MPP(M) = G_STATIC_MUTEX_INIT |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
110 #define XS_MUTEX_H(M) extern GStaticMutex XS_MPP(M) |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
111 #define XS_MUTEX_LOCK(M) g_static_mutex_lock(&XS_MPP(M)) |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
112 #define XS_MUTEX_UNLOCK(M) g_static_mutex_unlock(&XS_MPP(M)) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
113 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
114 /* Character set conversion helper macros |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
115 */ |
1573
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
116 #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
|
117 #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
|
118 #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
|
119 #define XS_CS_FREE(M) g_free(M) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
120 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
121 /* Shorthands for linked lists |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
122 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
123 #define LPREV (pNode->pPrev) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
124 #define LTHIS (pNode) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
125 #define LNEXT (pNode->pNext) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
126 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
127 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
128 /* Plugin-wide typedefs |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
129 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
130 typedef struct { |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
131 gint tuneSpeed, |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
132 tuneLength; |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
133 gboolean tunePlayed; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
134 } t_xs_subtuneinfo; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
135 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
136 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
137 typedef struct { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
138 gchar *sidFilename, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
139 *sidName, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
140 *sidComposer, |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
141 *sidCopyright, |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
142 *sidFormat; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
143 gint loadAddr, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
144 initAddr, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
145 playAddr, |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
146 dataFileLen, |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
147 sidModel; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
148 gint nsubTunes, startTune; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
149 t_xs_subtuneinfo *subTunes; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
150 } t_xs_tuneinfo; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
151 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
152 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
153 /* Global variables |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
154 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
155 extern InputPlugin xs_plugin_ip; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
156 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
157 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
158 /* Plugin function prototypes |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
159 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
160 void xs_init(void); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
161 void xs_reinit(void); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
162 void xs_close(void); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
163 gint xs_is_our_file(gchar *); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
164 gint xs_is_our_file_vfs(gchar *, t_xs_file *); |
561
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
463
diff
changeset
|
165 void xs_play_file(InputPlayback *); |
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
463
diff
changeset
|
166 void xs_stop(InputPlayback *); |
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
463
diff
changeset
|
167 void xs_pause(InputPlayback *, short); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
168 void xs_seek(InputPlayback *, gint); |
561
914c96de3244
[svn] Convert plugins to use InputPlayback.output instead of InputPlugin.output
iabervon
parents:
463
diff
changeset
|
169 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
|
170 Tuple * xs_get_song_tuple(gchar *); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
171 void xs_about(void); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
172 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
173 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
174 t_xs_tuneinfo *xs_tuneinfo_new(const gchar * pcFilename, |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
175 gint nsubTunes, gint startTune, const gchar * sidName, |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
176 const gchar * sidComposer, const gchar * sidCopyright, |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
177 gint loadAddr, gint initAddr, gint playAddr, |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
178 gint dataFileLen, const gchar *sidFormat, gint sidModel); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
179 void xs_tuneinfo_free(t_xs_tuneinfo *); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
180 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
181 void xs_error(const char *, ...); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
182 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
183 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
184 /* Debugging |
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 #ifndef DEBUG_NP |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
187 void XSDEBUG(const char *, ...); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
188 #else |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
189 # ifdef DEBUG |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
190 # 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
|
191 # else |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
192 # define XSDEBUG(...) /* stub */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
193 # endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
194 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
195 |
1573
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
196 |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
197 /* 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
|
198 */ |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
199 #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
|
200 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
|
201 (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
|
202 if (xs_ ## MV ) { \ |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
203 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
|
204 xs_ ## MV = NULL; \ |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
205 } \ |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
206 return FALSE; \ |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
207 } |
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 #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
|
210 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
|
211 (void) b; (void) d; \ |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
212 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
|
213 xs_ ## MV = NULL; \ |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
214 } |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
215 |
82548d92c922
Some macro additions for handling Gtk+/Glib stuff; Misc merges.
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
216 #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
|
217 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
|
218 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
219 #ifdef __cplusplus |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
220 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
221 #endif |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
561
diff
changeset
|
222 #endif /* XMMS_SID_H */ |