Mercurial > audlegacy-plugins
annotate src/cue/cuesheet.h @ 2951:6abe60a81301
reimplemented cuesheet plugin using subtune.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 11 Oct 2008 20:03:01 +0900 |
parents | |
children | 63bf9d97ce65 |
rev | line source |
---|---|
2951
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
1 #ifndef _CUE_H_ |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
2 #define _CUE_H_ |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
3 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
4 #include "config.h" |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
5 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
6 #define AUD_DEBUG 1 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
7 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
8 #include <string.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
9 #include <stdlib.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
10 #include <stdio.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
11 #include <ctype.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
12 #include <audacious/plugin.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
13 #include <audacious/output.h> |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
14 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
15 #define MAX_CUE_LINE_LENGTH 1000 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
16 #define MAX_CUE_TRACKS 1000 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
17 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
18 extern GMutex *cue_mutex; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
19 extern GCond *cue_cond; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
20 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
21 typedef enum { |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
22 STOP = 0, |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
23 RUN, |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
24 EXIT |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
25 } watchdog_state_t; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
26 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
27 extern watchdog_state_t watchdog_state; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
28 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
29 extern gint last_cue_track; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
30 extern gint cur_cue_track; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
31 extern gulong target_time; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
32 extern GMutex *cue_target_time_mutex; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
33 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
34 typedef struct cue_tracks { |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
35 gchar *title; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
36 gchar *performer; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
37 gint index; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
38 gint duration; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
39 } cue_tracks_t; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
40 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
41 extern cue_tracks_t cue_tracks[]; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
42 extern gint finetune_seek; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
43 extern InputPlayback *real_ip; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
44 extern InputPlayback *caller_ip; |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
45 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
46 /* prototypes */ |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
47 void cache_cue_file(gchar *f); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
48 void free_cue_info(void); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
49 void fix_cue_argument(char *line); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
50 int is_our_file(gchar *filename); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
51 void play(InputPlayback *data); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
52 void play_cue_uri(InputPlayback *data, gchar *uri); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
53 void mseek(InputPlayback *data, gulong time); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
54 void seek(InputPlayback *data, gint time); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
55 void stop(InputPlayback *data); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
56 void cue_pause(InputPlayback *data, short); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
57 Tuple *get_song_tuple(gchar *uri); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
58 void cue_init(void); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
59 gint get_time(InputPlayback *playback); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
60 void cue_cleanup(void); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
61 gpointer watchdog_func(gpointer data); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
62 Tuple *probe_for_tuple(gchar *songFilename, VFSFile *fd); |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
63 |
6abe60a81301
reimplemented cuesheet plugin using subtune.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff
changeset
|
64 #endif |