changeset 328:9466f03c92f8 trunk

[svn] Remove static plugin.h trickery to cure SIGFPE and related madness.
author chainsaw
date Sat, 24 Dec 2005 18:31:05 -0800
parents eec397c937e6
children 53393c07735b
files Plugins/Input/modplug/Makefile.am Plugins/Input/modplug/archive/Makefile.am Plugins/Input/modplug/gui/Makefile.am Plugins/Input/modplug/modplugbmp.h Plugins/Input/modplug/plugin.cpp Plugins/Input/modplug/plugin.h
diffstat 6 files changed, 5 insertions(+), 139 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/modplug/Makefile.am	Tue Dec 20 13:33:42 2005 -0800
+++ b/Plugins/Input/modplug/Makefile.am	Sat Dec 24 18:31:05 2005 -0800
@@ -8,8 +8,7 @@
 libdir = $(plugindir)/$(INPUT_PLUGIN_DIR)
 
 INCLUDES = @GTK_CFLAGS@ -I.. -I$(top_srcdir) -I$(top_builddir)/intl
-libmodplug_la_LDFLAGS  = -module -avoid-version -lstdc++
+libmodplug_la_LDFLAGS  = $(PLUGIN_LDFLAGS) $(GTK_LIBS) -lstdc++ -lmodplug ./archive/libarchive.la ./gui/libgui.la
 libmodplug_la_SOURCES  = plugin.cpp modplugbmp.cpp
-libmodplug_la_LIBADD   = ./archive/libarchive.la ./gui/libgui.la -lmodplug $(GTK_LIBS)
 
 noinst_HEADERS = modplugbmp.h plugin.h stddefs.h
--- a/Plugins/Input/modplug/archive/Makefile.am	Tue Dec 20 13:33:42 2005 -0800
+++ b/Plugins/Input/modplug/archive/Makefile.am	Sat Dec 24 18:31:05 2005 -0800
@@ -1,7 +1,7 @@
 INCLUDES = -I../../..
 
 noinst_LTLIBRARIES = libarchive.la
-libarchive_la_LDFLAGS = -module -avoid-version
+libarchive_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 libarchive_la_SOURCES = archive.cpp     \
                         open.cpp        \
                         arch_raw.cpp    \
--- a/Plugins/Input/modplug/gui/Makefile.am	Tue Dec 20 13:33:42 2005 -0800
+++ b/Plugins/Input/modplug/gui/Makefile.am	Sat Dec 24 18:31:05 2005 -0800
@@ -1,7 +1,7 @@
 INCLUDES = @GTK_CFLAGS@
 
 noinst_LTLIBRARIES = libgui.la
-libgui_la_LDFLAGS = -module -avoid-version
+libgui_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 libgui_la_SOURCES = main.cpp support.cpp interface.cpp callbacks.cpp
 
 noinst_HEADERS = callbacks.h interface.h support.h main.h
--- a/Plugins/Input/modplug/modplugbmp.h	Tue Dec 20 13:33:42 2005 -0800
+++ b/Plugins/Input/modplug/modplugbmp.h	Sat Dec 24 18:31:05 2005 -0800
@@ -13,7 +13,7 @@
 #include "stddefs.h"
 #endif
 
-#include "plugin.h"
+#include "audacious/plugin.h"
 
 using namespace std;
 
--- a/Plugins/Input/modplug/plugin.cpp	Tue Dec 20 13:33:42 2005 -0800
+++ b/Plugins/Input/modplug/plugin.cpp	Sat Dec 24 18:31:05 2005 -0800
@@ -4,7 +4,7 @@
  * This source code is public domain.
  */
 
-#include "plugin.h"
+#include "audacious/plugin.h"
 #include <libmodplug/modplug.h>
 #include "gui/main.h"
 
--- a/Plugins/Input/modplug/plugin.h	Tue Dec 20 13:33:42 2005 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/* From XMMS... */
-
-#ifndef PLUGIN_H
-#define PLUGIN_H
-
-#include<glib.h>
-
-typedef enum
-{
-	FMT_U8, FMT_S8, FMT_U16_LE, FMT_U16_BE, FMT_U16_NE, FMT_S16_LE, FMT_S16_BE, FMT_S16_NE
-}
-AFormat;
-
-typedef struct
-{
-	void *handle;		/* Filled in by xmms */
-	char *filename;		/* Filled in by xmms */
-	char *description;	/* The description that is shown in the preferences box */
-	void (*init) (void);
-	void (*about) (void);	/* Show the about box */
-	void (*configure) (void);	/* Show the configuration dialog */
-	void (*get_volume) (int *l, int *r);
-	void (*set_volume) (int l, int r);	/* Set the volume */
-	int (*open_audio) (AFormat fmt, int rate, int nch);	/* Open the device, if the device can't handle the given 
-								   parameters the plugin is responsible for downmixing
-								   the data to the right format before outputting it */
-	void (*write_audio) (void *ptr, int length);	/* The input plugin calls this to write data to the output 
-							   buffer */
-	void (*close_audio) (void);	/* No comment... */
-	void (*flush) (int time);	/* Flush the buffer and set the plugins internal timers to time */
-	void (*pause) (short paused);	/* Pause or unpause the output */
-	int (*buffer_free) (void);	/* Return the amount of data that can be written to the buffer,
-					   two calls to this without a call to write_audio should make
-					   the plugin output audio directly */
-	int (*buffer_playing) (void);	/* Returns TRUE if the plugin currently is playing some audio,
-					   otherwise return FALSE */
-	int (*output_time) (void);	/* Return the current playing time */
-	int (*written_time) (void);	/* Return the length of all the data that has been written to
-					   the buffer */
-}
-OutputPlugin;
-
-typedef struct
-{
-	void *handle;		/* Filled in by xmms */
-	char *filename;		/* Filled in by xmms */
-	char *description;	/* The description that is shown in the preferences box */
-	void (*init) (void);	/* Called when the plugin is loaded */
-	void (*cleanup) (void);	/* Called when the plugin is unloaded */
-	void (*about) (void);	/* Show the about box */
-	void (*configure) (void);	/* Show the configure box */
-	int (*mod_samples) (gpointer *data, gint length, AFormat fmt, gint srate, gint nch);	/* Modify samples */
-	void (*query_format) (AFormat *fmt,gint *rate, gint *nch);
-}
-EffectPlugin;
-
-typedef enum
-{
-	INPUT_VIS_ANALYZER, INPUT_VIS_SCOPE, INPUT_VIS_VU, INPUT_VIS_OFF
-}
-InputVisType;
-
-typedef struct
-{
-	void *handle;		/* Filled in by xmms */
-	char *filename;		/* Filled in by xmms */
-	char *description;	/* The description that is shown in the preferences box */
-	void (*init) (void);	/* Called when the plugin is loaded */
-	void (*about) (void);	/* Show the about box */
-	void (*configure) (void);
-	int (*is_our_file) (char *filename);	/* Return 1 if the plugin can handle the file */
-	GList *(*scan_dir) (char *dirname);	/* Look in Input/cdaudio/cdaudio.c to see how */
-	/* to use this */
-	void (*play_file) (char *filename);	/* Guess what... */
-	void (*stop) (void);	/* Tricky one */
-	void (*pause) (short paused);	/* Pause or unpause */
-	void (*seek) (int time);	/* Seek to the specified time */
-	void (*set_eq) (int on, float preamp, float *bands);	/* Set the equalizer, most plugins won't be able to do this */
-	int (*get_time) (void);	/* Get the time, usually returns the output plugins output time */
-	void (*get_volume) (int *l, int *r);	/* Input-plugin specific volume functions, just provide a NULL if */
-	void (*set_volume) (int l, int r);	/*  you want the output plugin to handle it */
-	void (*add_vis) (int time, unsigned char *data, InputVisType type); /* OBSOLETE, DO NOT USE! */
-	InputVisType (*get_vis_type) (void); /* OBSOLETE, DO NOT USE! */
-	void (*add_vis_pcm) (int time, AFormat fmt, int nch, int length, void *ptr); /* Send data to the visualization plugins 
-											Preferably 512 samples/block */
-	void (*set_info) (char *title, int length, int rate, int freq, int nch);	/* Fill in the stuff that is shown in the player window
-											   set length to -1 if it's unknown. Filled in by xmms */
-	void (*set_info_text) (char *text);	/* Show some text in the song title box in the main window,
-						   call it with NULL as argument to reset it to the song title.
-						   Filled in by xmms */
-	void (*get_song_info) (char *filename, char **title, int *length);	/* Function to grab the title string */
-	void (*file_info_box) (char *filename);		/* Bring up an info window for the filename passed in */
-	OutputPlugin *output;	/* Handle to the current output plugin. Filled in by xmms */
-}
-InputPlugin;
-
-/* So that output plugins can communicate with effect plugins */
-EffectPlugin *get_current_effect_plugin(void);
-int effects_enabled(void);
-
-typedef struct
-{
-	void *handle;		/* Filled in by xmms */
-	char *filename;		/* Filled in by xmms */
-	int xmms_session;	/* The session ID for attaching to the control socket */
-	char *description;	/* The description that is shown in the preferences box */
-	void (*init) (void);	/* Called when the plugin is enabled */
-	void (*about) (void);	/* Show the about box */
-	void (*configure) (void);
-	void (*cleanup) (void);	/* Called when the plugin is disabled or when xmms exits */
-}
-GeneralPlugin;
-
-typedef struct _VisPlugin
-{
-	void *handle; 	/* Filled in by xmms */
-	char *filename; /* Filled in by xmms */
-	int xmms_session; /* The session ID for attaching to the control socket */
-	char *description; /* The description that is shown in the preferences box */
-	int num_pcm_chs_wanted; /* Numbers of PCM channels wanted in the call to render_pcm */
-	int num_freq_chs_wanted; /* Numbers of freq channels wanted in the call to render_freq */
-	void (*init)(void); /* Called when the plugin is enabled */
-	void (*cleanup)(void); /* Called when the plugin is disabled */
-	void (*about)(void); /* Show the about box */
-	void (*configure)(void); /* Show the configure box */
-	void (*disable_plugin)(struct _VisPlugin *); /* Call this with a pointer to your plugin to disable the plugin */
-	void (*playback_start)(void); /* Called when playback starts */
-	void (*playback_stop)(void); /* Called when playback stops */
-	void (*render_pcm)(gint16 pcm_data[2][512]); /* Render the PCM data, don't do anything time consuming in here */
-	void (*render_freq)(gint16 freq_data[2][256]); /* Render the freq data, don't do anything time consuming in here */
-} VisPlugin;
-
-#endif