Mercurial > audlegacy-plugins
changeset 1659:53adc480f9a7
fixed some more plugins
author | mf0102 <0102@gmx.at> |
---|---|
date | Fri, 07 Sep 2007 15:14:36 +0200 |
parents | 5538324eb069 |
children | 206e7cb5fce7 |
files | src/console/Audacious_Driver.cxx src/modplug/plugin.cxx src/timidity/src/xmms-timidity.c |
diffstat | 3 files changed, 69 insertions(+), 89 deletions(-) [+] |
line wrap: on
line diff
--- a/src/console/Audacious_Driver.cxx Fri Sep 07 14:45:34 2007 +0200 +++ b/src/console/Audacious_Driver.cxx Fri Sep 07 15:14:36 2007 +0200 @@ -513,9 +513,9 @@ NULL, (gchar *)"Game console audio module decoder", console_init, + NULL, console_aboutbox, console_cfg_ui, - NULL, FALSE, NULL, NULL, @@ -543,8 +543,4 @@ InputPlugin *console_iplist[] = { &console_ip, NULL }; -extern "C" { - -DECLARE_PLUGIN(console, NULL, NULL, console_iplist, NULL, NULL, NULL, NULL,NULL); - -}; +SIMPLE_INPUT_PLUGIN(console, console_iplist);
--- a/src/modplug/plugin.cxx Fri Sep 07 14:45:34 2007 +0200 +++ b/src/modplug/plugin.cxx Fri Sep 07 15:14:36 2007 +0200 @@ -16,109 +16,109 @@ static void Init(void) { - gModplugXMMS.SetInputPlugin(gModPlug); - gModplugXMMS.Init(); + gModplugXMMS.SetInputPlugin(gModPlug); + gModplugXMMS.Init(); } static int CanPlayFileFromVFS(char* aFilename, VFSFile *VFSFile) { - if(gModplugXMMS.CanPlayFileFromVFS(aFilename, VFSFile)) - return 1; - return 0; + if(gModplugXMMS.CanPlayFileFromVFS(aFilename, VFSFile)) + return 1; + return 0; } static void PlayFile(InputPlayback *data) { char* aFilename = data->filename; - gModplugXMMS.SetOutputPlugin(*data->output); - gModplugXMMS.PlayFile(aFilename, data); + gModplugXMMS.SetOutputPlugin(*data->output); + gModplugXMMS.PlayFile(aFilename, data); } static void Stop(InputPlayback *data) { - gModplugXMMS.Stop(); + gModplugXMMS.Stop(); } static void Pause(InputPlayback *data, short aPaused) { - gModplugXMMS.Pause((bool)aPaused); + gModplugXMMS.Pause((bool)aPaused); } static void Seek(InputPlayback *data, int aTime) { - gModplugXMMS.Seek(float32(aTime)); + gModplugXMMS.Seek(float32(aTime)); } static int GetTime(InputPlayback *data) { - float32 lTime; - - lTime = gModplugXMMS.GetTime(); - if(lTime == -1) - return -1; - else - return (int)(lTime * 1000); + float32 lTime; + + lTime = gModplugXMMS.GetTime(); + if(lTime == -1) + return -1; + else + return (int)(lTime * 1000); } static Tuple* GetSongTuple(char* aFilename) { - return gModplugXMMS.GetSongTuple(aFilename); + return gModplugXMMS.GetSongTuple(aFilename); } void ShowAboutBox(void) { - ShowAboutWindow(); + ShowAboutWindow(); } void ShowConfigureBox(void) { - ShowConfigureWindow(gModplugXMMS.GetModProps()); + ShowConfigureWindow(gModplugXMMS.GetModProps()); } void ShowFileInfoBox(char* aFilename) { - ShowInfoWindow(aFilename); + ShowInfoWindow(aFilename); } const gchar *fmts[] = - { "amf", "ams", "dbm", "dbf", "dsm", "far", "mdl", "stm", "ult", "j2b", "mt2", - "mdz", "mdr", "mdgz", "mdbz", "mod", "s3z", "s3r", "s3gz", "s3m", "xmz", "xmr", "xmgz", - "itz", "itr", "itgz", "dmf", "umx", "it", "669", "xm", "mtm", "psm", "ft2", NULL }; + { "amf", "ams", "dbm", "dbf", "dsm", "far", "mdl", "stm", "ult", "j2b", "mt2", + "mdz", "mdr", "mdgz", "mdbz", "mod", "s3z", "s3r", "s3gz", "s3m", "xmz", "xmr", "xmgz", + "itz", "itr", "itgz", "dmf", "umx", "it", "669", "xm", "mtm", "psm", "ft2", NULL }; InputPlugin gModPlug = { - NULL, - NULL, - (gchar *)"ModPlug Audio Plugin", - Init, - NULL, - ShowAboutBox, - ShowConfigureBox, - FALSE, - NULL, - NULL, - PlayFile, - Stop, - Pause, - Seek, - NULL, - GetTime, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - ShowFileInfoBox, - NULL, // output - GetSongTuple, - NULL, - NULL, - CanPlayFileFromVFS, // vfs - (gchar **)fmts, + NULL, + NULL, + (gchar *)"ModPlug Audio Plugin", + Init, + NULL, + ShowAboutBox, + ShowConfigureBox, + FALSE, + NULL, + NULL, + PlayFile, + Stop, + Pause, + Seek, + NULL, + GetTime, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + ShowFileInfoBox, + NULL, // output + GetSongTuple, + NULL, + NULL, + CanPlayFileFromVFS, // vfs + (gchar **)fmts }; InputPlugin *modplug_iplist[] = { &gModPlug, NULL }; -DECLARE_PLUGIN(modplug, NULL, NULL, modplug_iplist, NULL, NULL, NULL, NULL,NULL); +SIMPLE_INPUT_PLUGIN(modplug, modplug_iplist);
--- a/src/timidity/src/xmms-timidity.c Fri Sep 07 14:45:34 2007 +0200 +++ b/src/timidity/src/xmms-timidity.c Fri Sep 07 15:14:36 2007 +0200 @@ -37,34 +37,18 @@ #include "interface.h" InputPlugin xmmstimid_ip = { - NULL, - NULL, - "TiMidity Audio Plugin", - xmmstimid_init, - xmmstimid_about, - xmmstimid_configure, - NULL, - NULL, - xmmstimid_play_file, - xmmstimid_stop, - xmmstimid_pause, - xmmstimid_seek, - NULL, - xmmstimid_get_time, - NULL, - NULL, - xmmstimid_cleanup, - NULL, - NULL, - NULL, - NULL, - xmmstimid_get_song_info, - NULL, - NULL, - NULL, - NULL, - NULL, - xmmstimid_is_our_fd, + .description = "TiMidity Audio Plugin", + .init = xmmstimid_init, + .about = xmmstimid_about, + .configure = xmmstimid_configure, + .play_file = xmmstimid_play_file, + .stop = xmmstimid_stop, + .pause = xmmstimid_pause, + .seek = xmmstimid_seek, + .get_time = xmmstimid_get_time, + .cleanup = xmmstimid_cleanup, + .get_song_info = xmmstimid_get_song_info, + .is_our_file_from_vfs = xmmstimid_is_our_fd, }; InputPlugin *timidity_iplist[] = { &xmmstimid_ip, NULL };