annotate src/sid/xs_player.h @ 2345:0405c29fecf7

branch merge
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sun, 03 Feb 2008 00:06:33 +0900
parents 6d90d40ca0c8
children 251336bee085
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
1 #ifndef XS_PLAYER_H
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
2 #define XS_PLAYER_H
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
3
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
4 #include "xmms-sid.h"
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
5 #include "xs_config.h"
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
6
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
7 #ifdef __cplusplus
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
8 extern "C" {
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
9 #endif
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
10
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
11 struct t_xs_status;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
12
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
13 typedef struct {
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
14 gint plrIdent;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
15 gboolean (*plrProbe)(t_xs_file *);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
16 gboolean (*plrInit)(struct t_xs_status *);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
17 void (*plrClose)(struct t_xs_status *);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
18 gboolean (*plrInitSong)(struct t_xs_status *);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
19 guint (*plrFillBuffer)(struct t_xs_status *, gchar *, guint);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
20 gboolean (*plrLoadSID)(struct t_xs_status *, gchar *);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
21 void (*plrDeleteSID)(struct t_xs_status *);
1578
6d90d40ca0c8 Constify arguments.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
22 t_xs_tuneinfo* (*plrGetSIDInfo)(const gchar *);
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
23 gboolean (*plrUpdateSIDInfo)(struct t_xs_status *);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
24 void (*plrFlush)(struct t_xs_status *);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
25 } t_xs_player;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
26
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
27
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
28 typedef struct t_xs_status {
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
29 gint audioFrequency, /* Audio settings */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
30 audioChannels,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
31 audioBitsPerSample,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
32 oversampleFactor; /* Factor of oversampling */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
33 AFormat audioFormat;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
34 gboolean oversampleEnable; /* TRUE after sidEngine initialization,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
35 if xs_cfg.oversampleEnable == TRUE and
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
36 emulation backend supports oversampling.
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
37 */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
38 void *sidEngine; /* SID-emulation internal engine data */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
39 t_xs_player *sidPlayer; /* Selected player engine */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
40 gboolean isError, isPlaying, isInitialized;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
41 gint currSong, /* Current sub-tune */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
42 lastTime;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
43
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
44 t_xs_tuneinfo *tuneInfo;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
45 } t_xs_status;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
46
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
47
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
48 /* Global variables
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
49 */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
50 extern InputPlugin xs_plugin_ip;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
51
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
52 extern t_xs_status xs_status;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
53 XS_MUTEX_H(xs_status);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
54
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
55
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
56 #ifdef __cplusplus
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
57 }
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
58 #endif
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
59 #endif /* XS_PLAYER_H */