annotate src/xmms-sid.h @ 219:d18bf68d7bd9

Whitespace
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 15 Dec 2004 11:23:04 +0000
parents a7abcda7a86c
children 608f31f6c095
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
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 #ifdef __cplusplus
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 extern "C" {
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 #endif
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
29 #ifdef HAVE_CONFIG_H
24
271be59be975 Lots of changes
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
30 #include <config.h>
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
31 #endif
219
d18bf68d7bd9 Whitespace
Matti Hamalainen <ccr@tnsp.org>
parents: 147
diff changeset
32
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
33 #ifdef HAVE_ASSERT_H
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
34 #include <assert.h>
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
35 #else
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
36 #define assert(x) /* stub */
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
37 #endif
219
d18bf68d7bd9 Whitespace
Matti Hamalainen <ccr@tnsp.org>
parents: 147
diff changeset
38
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 #include <glib.h>
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 #include <xmms/plugin.h>
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
42 /*
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
43 * Some defines
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
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
46 #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
47
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 /*
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
49 * Generals
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 */
24
271be59be975 Lots of changes
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
51 #define XS_BUFSIZE (4096) /* Size for some buffers */
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
53 #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
54 #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
55
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
56 #define XS_STIL_MAXENTRY (128) /* Max number of sub-songs in STIL/SLDB node */
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
57
62
0d1df20745dd Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
58 #define XS_MIN_OVERSAMPLE (2) /* Minimum oversampling factor */
0d1df20745dd Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
59 #define XS_MAX_OVERSAMPLE (8) /* Maximum oversampling factor */
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
61 extern InputPlugin xs_plugin_ip; /* XMMS-SID plugin structure */
62
0d1df20745dd Started to rewrite STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 50
diff changeset
62
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
63
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
64 typedef struct {
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
65 gint tuneSpeed;
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
66 gint tuneLength;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
67 gchar *tuneTitle;
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
68 } t_xs_subtune;
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
69
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
70
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
71 typedef struct {
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
72 gchar *tuneFilename,
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
73 *tuneName,
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
74 *tuneComposer,
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
75 *tuneCopyright;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
76 gint nsubTunes, startTune;
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
77 t_xs_subtune subTunes[XS_STIL_MAXENTRY];
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
78 } t_xs_tune;
78
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
79
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
80
ab522ab65c85 Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 73
diff changeset
81 typedef struct {
127
ddb513bd2610 Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents: 119
diff changeset
82 gint audioFrequency,
ddb513bd2610 Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents: 119
diff changeset
83 audioFormat,
ddb513bd2610 Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents: 119
diff changeset
84 audioChannels,
ddb513bd2610 Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents: 119
diff changeset
85 audioBitsPerSample;
73
2bc607888f53 Added libsidplay2 module, lots of reworking of internals, sidplay1 support
Matti Hamalainen <ccr@tnsp.org>
parents: 72
diff changeset
86 void *player;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
87 gboolean isError, isPlaying;
132
4162a5370b9e Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents: 127
diff changeset
88 gint currSong,
4162a5370b9e Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents: 127
diff changeset
89 lastTime;
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
90 t_xs_tune *pTune;
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
91 } t_xs_status;
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
92
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
93
72
e3b205a6bc7e Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents: 65
diff changeset
94 extern t_xs_status xs_status;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 /*
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
98 * Plugin function prototypes
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 */
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 void xs_init(void);
147
a7abcda7a86c SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents: 138
diff changeset
101 void xs_reinit(void);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
102 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
103 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
104 void xs_play_file(gchar *);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 void xs_stop(void);
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 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
107 void xs_seek(gint);
bf7b647b3239 The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
108 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
109 void xs_get_song_info(gchar *, gchar **, gint *);
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
110 void xs_fileinfo(gchar *);
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
111 void xs_about(void);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112
106
98a72c44f56b Fileinfo now working with rudimentary informations. Slightly buggy.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
113 t_xs_tune *xs_tune_new(gchar *, gint, gint, gchar *, gchar *, gchar *);
87
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
114 void xs_tune_free(t_xs_tune *);
94497283affa Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents: 78
diff changeset
115
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 * Debugging and error handling macros
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 */
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 #ifdef DEBUG
101
Matti Hamalainen <ccr@tnsp.org>
parents: 100
diff changeset
121 #define XSDEBUG(x...) { fprintf(stderr, "XS[%s:%d]: ", __FILE__, (int) __LINE__); fprintf(stderr, ## x); }
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 #else
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123 #define XSDEBUG(x...) /* foo */
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 #endif
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125
24
271be59be975 Lots of changes
Matti Hamalainen <ccr@tnsp.org>
parents: 3
diff changeset
126 #define XSERR(x...) { fprintf(stderr, PACKAGE_NAME ": "); fprintf(stderr, ## x); }
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129 #ifdef __cplusplus
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 #endif
92
2607683bc9eb Improvements in length- and title handling.
Matti Hamalainen <ccr@tnsp.org>
parents: 87
diff changeset
132 #endif /* _XMMS_SID_H */