21 #ifndef AUDACIOUS_PLUGIN_H
22 #define AUDACIOUS_PLUGIN_H
32 #define _AUD_PLUGIN_MAGIC 0x8EAC8DE2
47 #define _AUD_PLUGIN_VERSION_MIN 40
48 #define _AUD_PLUGIN_VERSION 43
96 #define PLUGIN_COMMON_FIELDS \
102 const char * domain; \
103 const char * about_text; \
104 const PluginPreferences * prefs; \
105 bool_t (* init) (void); \
106 void (* cleanup) (void); \
107 int (* take_message) (const char * code, const void * data, int size); \
108 void (* about) (void); \
109 void (* configure) (void); \
231 void (*
process) (
float * * data,
int * samples);
239 void (*
finish) (
float * * data,
int * samples);
304 void (*
set_data) (InputPlayback * p,
void * data);
307 void * (* get_data) (InputPlayback * p);
315 void (*
set_params) (InputPlayback * p,
int bitrate,
int samplerate,
320 void (*
set_tuple) (InputPlayback * playback, Tuple * tuple);
396 void * * data, int64_t * size);
421 void (*
mseek) (InputPlayback * playback,
int time);
427 void (*
stop) (InputPlayback * playback);
443 void * (* get_widget) (void);
463 void * (* get_widget) (void);
491 #undef PLUGIN_COMMON_FIELDS
493 #define AUD_PLUGIN(stype, itype, ...) \
494 AudAPITable * _aud_api_table = NULL; \
495 stype _aud_plugin_self = { \
496 .magic = _AUD_PLUGIN_MAGIC, \
497 .version = _AUD_PLUGIN_VERSION, \
499 .size = sizeof (stype), \
501 stype * get_plugin_info (AudAPITable * table) { \
502 _aud_api_table = table; \
503 return & _aud_plugin_self; \
506 #define AUD_TRANSPORT_PLUGIN(...) AUD_PLUGIN (TransportPlugin, PLUGIN_TYPE_TRANSPORT, __VA_ARGS__)
507 #define AUD_PLAYLIST_PLUGIN(...) AUD_PLUGIN (PlaylistPlugin, PLUGIN_TYPE_PLAYLIST, __VA_ARGS__)
508 #define AUD_INPUT_PLUGIN(...) AUD_PLUGIN (InputPlugin, PLUGIN_TYPE_INPUT, __VA_ARGS__)
509 #define AUD_EFFECT_PLUGIN(...) AUD_PLUGIN (EffectPlugin, PLUGIN_TYPE_EFFECT, __VA_ARGS__)
510 #define AUD_OUTPUT_PLUGIN(...) AUD_PLUGIN (OutputPlugin, PLUGIN_TYPE_OUTPUT, __VA_ARGS__)
511 #define AUD_VIS_PLUGIN(...) AUD_PLUGIN (VisPlugin, PLUGIN_TYPE_VIS, __VA_ARGS__)
512 #define AUD_GENERAL_PLUGIN(...) AUD_PLUGIN (GeneralPlugin, PLUGIN_TYPE_GENERAL, __VA_ARGS__)
513 #define AUD_IFACE_PLUGIN(...) AUD_PLUGIN (IfacePlugin, PLUGIN_TYPE_IFACE, __VA_ARGS__)
515 #define PLUGIN_HAS_FUNC(p, func) \
516 ((p)->size > (char *) & (p)->func - (char *) (p) && (p)->func)
bool_t(* is_focused)(void)
void(* run_gtk_plugin)(void *widget, const char *name)
void(* pause)(bool_t pause)
void(* write_audio)(void *data, int length)
int(* adjust_delay)(int delay)
PLUGIN_COMMON_FIELDS void(* start)(int *channels, int *rate)
void(* uninstall_toolbar)(void *button)
Main API header for accessing Audacious VFS functionality.
void(* abort_write)(void)
const char PluginHandle decoder const char PluginHandle decoder const char PluginHandle decoder void const PreferencesWidget int
PLUGIN_COMMON_FIELDS void(* show)(bool_t show)
void(* render_multi_pcm)(const float *pcm, int channels)
#define PLUGIN_COMMON_FIELDS
void(* set_volume)(int l, int r)
void(* render_mono_pcm)(const float *pcm)
void(* set_replaygain_info)(const ReplayGainInfo *info)
void(* finish)(float **data, int *samples)
PLUGIN_COMMON_FIELDS const char *const * schemes
void(* close_audio)(void)
PLUGIN_COMMON_FIELDS int probe_priority
PLUGIN_COMMON_FIELDS const char *const * extensions
void(* show_error)(const char *markup)
void(* process)(float **data, int *samples)
void(* stop_gtk_plugin)(void *widget)
const VFSConstructor * vtable
int(* written_time)(void)
bool_t(* open_audio)(int format, int rate, int channels)
bool_t(* load)(const char *path, VFSFile *file, char **title, Index *filenames, Index *tuples)
PLUGIN_COMMON_FIELDS void(* clear)(void)
void(* write_audio)(void *data, int size)
bool_t(* open_audio)(int format, int rate, int chans)
void(* period_wait)(void)
void(* render_freq)(const float *freq)
void(* get_volume)(int *l, int *r)
PLUGIN_COMMON_FIELDS bool_t enabled_by_default
bool_t(* save)(const char *path, VFSFile *file, const char *title, Index *filenames, Index *tuples)
Basic Tuple handling API.
void(* show_jump_to_track)(void)
void(* show_filebrowser)(bool_t play_button)
void(* install_toolbar)(void *button)