comparison src/audacious/plugin.h @ 3746:d5580c6bca31

export xconvert API
author William Pitcock <nenolod@atheme.org>
date Sun, 14 Oct 2007 03:49:00 -0500
parents e26ac0692e8f
children ffc8e51efe0c
comparison
equal deleted inserted replaced
3745:e26ac0692e8f 3746:d5580c6bca31
92 #include "audacious/playlist.h" 92 #include "audacious/playlist.h"
93 #include "audacious/input.h" 93 #include "audacious/input.h"
94 #include "audacious/mime.h" 94 #include "audacious/mime.h"
95 #include "audacious/custom_uri.h" 95 #include "audacious/custom_uri.h"
96 #include "audacious/hook.h" 96 #include "audacious/hook.h"
97 #include "audacious/xconvert.h"
97 98
98 #define PLUGIN_COMMON_FIELDS \ 99 #define PLUGIN_COMMON_FIELDS \
99 gpointer handle; \ 100 gpointer handle; \
100 gchar *filename; \ 101 gchar *filename; \
101 gchar *description; \ 102 gchar *description; \
452 /* hook API */ 453 /* hook API */
453 void (*hook_register)(const gchar *name); 454 void (*hook_register)(const gchar *name);
454 gint (*hook_associate)(const gchar *name, HookFunction func, gpointer user_data); 455 gint (*hook_associate)(const gchar *name, HookFunction func, gpointer user_data);
455 gint (*hook_dissociate)(const gchar *name, HookFunction func); 456 gint (*hook_dissociate)(const gchar *name, HookFunction func);
456 void (*hook_call)(const gchar *name, gpointer hook_data); 457 void (*hook_call)(const gchar *name, gpointer hook_data);
458
459 /* xconvert API */
460 struct xmms_convert_buffers *(*xmms_convert_buffers_new)(void);
461 void *(*xmms_convert_buffers_free)(struct xmms_convert_buffers *buf);
462 void *(*xmms_convert_buffers_destroy)(struct xmms_convert_buffers *buf);
463 convert_func_t (*xmms_convert_get_func)(AFormat output, AFormat input);
464 convert_channel_func_t (*xmms_convert_get_channel_func)(AFormat fmt,
465 int output,
466 int input);
467 convert_freq_func_t (*xmms_convert_get_frequency_func)(AFormat fmt,
468 int channels);
469
457 }; 470 };
458 471
459 /* Convenience macros for accessing the public API. */ 472 /* Convenience macros for accessing the public API. */
460 /* public name vtable mapping */ 473 /* public name vtable mapping */
461 #define aud_vfs_fopen _audvt->vfs_fopen 474 #define aud_vfs_fopen _audvt->vfs_fopen
680 #define aud_open_ini_file _audvt->open_ini_file 693 #define aud_open_ini_file _audvt->open_ini_file
681 #define aud_close_ini_file _audvt->close_ini_file 694 #define aud_close_ini_file _audvt->close_ini_file
682 #define aud_read_ini_string _audvt->read_ini_string 695 #define aud_read_ini_string _audvt->read_ini_string
683 #define aud_read_ini_array _audvt->read_ini_array 696 #define aud_read_ini_array _audvt->read_ini_array
684 697
698 #define aud_convert_buffers_new _audvt->xmms_convert_buffers_new
699 #define aud_convert_buffers_free _audvt->xmms_convert_buffers_free
700 #define aud_convert_buffers_destroy _audvt->xmms_convert_buffers_destroy
701 #define aud_convert_get_func _audvt->xmms_convert_get_func
702 #define aud_convert_get_channel_func _audvt->xmms_convert_get_channel_func
703 #define aud_convert_get_frequency_func _audvt->xmms_convert_get_frequency_func
704
685 /* for multi-file plugins :( */ 705 /* for multi-file plugins :( */
686 extern struct _AudaciousFuncTableV1 *_audvt; 706 extern struct _AudaciousFuncTableV1 *_audvt;
687 707
688 #define DECLARE_PLUGIN(name, init, fini, ...) \ 708 #define DECLARE_PLUGIN(name, init, fini, ...) \
689 G_BEGIN_DECLS \ 709 G_BEGIN_DECLS \