Mercurial > audlegacy
comparison src/audacious/plugin.h @ 2436:f346d30bf5ab trunk
[svn] Change the input plugin API to use a struct for the currently-playing file.
author | iabervon |
---|---|
date | Sun, 28 Jan 2007 17:02:15 -0800 |
parents | 3149d4b1a9a9 |
children | 62d8f9c05832 |
comparison
equal
deleted
inserted
replaced
2435:5b23e9b07317 | 2436:f346d30bf5ab |
---|---|
78 typedef struct _GeneralPlugin GeneralPlugin; | 78 typedef struct _GeneralPlugin GeneralPlugin; |
79 typedef struct _VisPlugin VisPlugin; | 79 typedef struct _VisPlugin VisPlugin; |
80 | 80 |
81 typedef struct _LowlevelPlugin LowlevelPlugin; | 81 typedef struct _LowlevelPlugin LowlevelPlugin; |
82 | 82 |
83 typedef struct _InputPlayback InputPlayback; | |
84 | |
83 /* Sadly, this is the most we can generalize out of the disparate | 85 /* Sadly, this is the most we can generalize out of the disparate |
84 plugin structs usable with typecasts - descender */ | 86 plugin structs usable with typecasts - descender */ |
85 struct _Plugin { | 87 struct _Plugin { |
86 gpointer handle; | 88 gpointer handle; |
87 gchar *filename; | 89 gchar *filename; |
143 | 145 |
144 gint (*mod_samples) (gpointer * data, gint length, AFormat fmt, gint srate, gint nch); | 146 gint (*mod_samples) (gpointer * data, gint length, AFormat fmt, gint srate, gint nch); |
145 void (*query_format) (AFormat * fmt, gint * rate, gint * nch); | 147 void (*query_format) (AFormat * fmt, gint * rate, gint * nch); |
146 }; | 148 }; |
147 | 149 |
150 struct _InputPlayback { | |
151 gchar *filename; | |
152 InputPlugin *plugin; | |
153 void *data; | |
154 OutputPlugin *output; | |
155 }; | |
156 | |
148 struct _InputPlugin { | 157 struct _InputPlugin { |
149 gpointer handle; | 158 gpointer handle; |
150 gchar *filename; | 159 gchar *filename; |
151 | 160 |
152 gchar *description; | 161 gchar *description; |
156 void (*configure) (void); | 165 void (*configure) (void); |
157 | 166 |
158 gint (*is_our_file) (gchar * filename); | 167 gint (*is_our_file) (gchar * filename); |
159 GList *(*scan_dir) (gchar * dirname); | 168 GList *(*scan_dir) (gchar * dirname); |
160 | 169 |
161 void (*play_file) (gchar * filename); | 170 void (*play_file) (InputPlayback * playback); |
162 void (*stop) (void); | 171 void (*stop) (InputPlayback * playback); |
163 void (*pause) (gshort paused); | 172 void (*pause) (InputPlayback * playback, gshort paused); |
164 void (*seek) (gint time); | 173 void (*seek) (InputPlayback * playback, gint time); |
165 | 174 |
166 void (*set_eq) (gint on, gfloat preamp, gfloat * bands); | 175 void (*set_eq) (gint on, gfloat preamp, gfloat * bands); |
167 | 176 |
168 gint (*get_time) (void); | 177 gint (*get_time) (InputPlayback * playback); |
169 | 178 |
170 void (*get_volume) (gint * l, gint * r); | 179 void (*get_volume) (gint * l, gint * r); |
171 void (*set_volume) (gint l, gint r); | 180 void (*set_volume) (gint l, gint r); |
172 | 181 |
173 void (*cleanup) (void); | 182 void (*cleanup) (void); |