# HG changeset patch # User Paula Stanciu # Date 1218100606 -10800 # Node ID c6f352d25d273c59de19d406a5cf181ce219f2b6 # Parent b86e9f9663f4d674d02a7ead9e6c9951895c616a makeing possible to reinitialize the output plugin from outher plugins diff -r b86e9f9663f4 -r c6f352d25d27 src/audacious/output.c --- a/src/audacious/output.c Wed Jul 30 23:04:32 2008 +0100 +++ b/src/audacious/output.c Thu Aug 07 12:16:46 2008 +0300 @@ -684,3 +684,16 @@ SAD_dither_apply_replaygain(sad_state_from_float, &info, &mode); } + +void output_plugin_cleanup(void) +{ + OutputPlugin *op = get_current_output_plugin(); + op->init(); + output_close_audio(); + printf("output plugin cleanupn\n"); +} +void output_plugin_reinit(void) +{ + + printf("output plugin reinit \n"); +} diff -r b86e9f9663f4 -r c6f352d25d27 src/audacious/output.h --- a/src/audacious/output.h Wed Jul 30 23:04:32 2008 +0100 +++ b/src/audacious/output.h Thu Aug 07 12:16:46 2008 +0300 @@ -70,5 +70,6 @@ extern OutputPlugin psuedo_output_plugin; extern OutputPluginData op_data; - +void output_plugin_cleanup(void); +void output_plugin_reinit(void); #endif /* AUDACIOUS_OUTPUT_H */ diff -r b86e9f9663f4 -r c6f352d25d27 src/audacious/plugin.h --- a/src/audacious/plugin.h Wed Jul 30 23:04:32 2008 +0100 +++ b/src/audacious/plugin.h Thu Aug 07 12:16:46 2008 +0300 @@ -650,6 +650,8 @@ gboolean (*vfs_fget_be16)(guint16 *value, VFSFile *stream); gboolean (*vfs_fget_be32)(guint32 *value, VFSFile *stream); gboolean (*vfs_fget_be64)(guint64 *value, VFSFile *stream); + void (*output_plugin_cleanup)(void); + void (*output_plugin_reinit)(void); }; /* Convenience macros for accessing the public API. */ @@ -1008,6 +1010,8 @@ #define aud_save_preset_file _audvt->save_preset_file #define aud_equalizer_read_aud_preset _audvt->equalizer_read_aud_preset #define aud_load_preset_file _audvt->load_preset_file +#define aud_output_plugin_cleanup _audvt->output_plugin_cleanup +#define aud_output_plugin_reinit _audvt->output_plugin_reinit #include "audacious/auddrct.h" diff -r b86e9f9663f4 -r c6f352d25d27 src/audacious/pluginenum.c --- a/src/audacious/pluginenum.c Wed Jul 30 23:04:32 2008 +0100 +++ b/src/audacious/pluginenum.c Thu Aug 07 12:16:46 2008 +0300 @@ -396,6 +396,8 @@ .save_preset_file = save_preset_file, .equalizer_read_aud_preset = equalizer_read_aud_preset, .load_preset_file = load_preset_file, + .output_plugin_cleanup = output_plugin_cleanup, + .output_plugin_reinit = output_plugin_reinit, }; /*****************************************************************/