Mercurial > audlegacy-plugins
comparison src/modplug/plugin.cxx @ 2456:e67bce91d70c
revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
| author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
|---|---|
| date | Thu, 20 Mar 2008 01:37:46 +0900 |
| parents | 7ee1bc4d5f5b |
| children | a336fe28b63a |
comparison
equal
deleted
inserted
replaced
| 2455:50ae65a59351 | 2456:e67bce91d70c |
|---|---|
| 1 /* Modplug XMMS Plugin | 1 /* Modplug XMMS Plugin |
| 2 * Authors: Kenton Varda <temporal@gauge3d.org> | 2 * Authors: Kenton Varda <temporal@gauge3d.org> |
| 3 * | 3 * |
| 4 * This source code is public domain. | 4 * This source code is public domain. |
| 5 */ | 5 */ |
| 6 | |
| 7 // #define AUD_DEBUG 1 | |
| 6 | 8 |
| 7 #include "modplug.h" | 9 #include "modplug.h" |
| 8 #include "gui/main.h" | 10 #include "gui/main.h" |
| 9 extern "C" { | 11 extern "C" { |
| 10 #include <audacious/plugin.h> | 12 #include <audacious/plugin.h> |
| 18 gModplugXMMS.Init(); | 20 gModplugXMMS.Init(); |
| 19 } | 21 } |
| 20 | 22 |
| 21 static int CanPlayFileFromVFS(char* aFilename, VFSFile *VFSFile) | 23 static int CanPlayFileFromVFS(char* aFilename, VFSFile *VFSFile) |
| 22 { | 24 { |
| 25 AUDDBG("aFilename=%s\n", aFilename); | |
| 23 if(gModplugXMMS.CanPlayFileFromVFS(aFilename, VFSFile)) | 26 if(gModplugXMMS.CanPlayFileFromVFS(aFilename, VFSFile)) |
| 24 return 1; | 27 return 1; |
| 25 return 0; | 28 return 0; |
| 26 } | 29 } |
| 27 | 30 |
| 28 static void PlayFile(InputPlayback *data) | 31 static void PlayFile(InputPlayback *data) |
| 29 { | 32 { |
| 30 char* aFilename = data->filename; | 33 char* aFilename = data->filename; |
| 31 gModplugXMMS.SetOutputPlugin(*data->output); | 34 gModplugXMMS.SetOutputPlugin(*data->output); |
| 32 gModplugXMMS.PlayFile(aFilename, data); | 35 gModplugXMMS.PlayFile(aFilename, data); |
| 33 } | 36 } |
| 34 | 37 |
| 35 static void Stop(InputPlayback *data) | 38 static void Stop(InputPlayback *data) |
| 79 } | 82 } |
| 80 | 83 |
| 81 const gchar *fmts[] = | 84 const gchar *fmts[] = |
| 82 { "amf", "ams", "dbm", "dbf", "dsm", "far", "mdl", "stm", "ult", "j2b", "mt2", | 85 { "amf", "ams", "dbm", "dbf", "dsm", "far", "mdl", "stm", "ult", "j2b", "mt2", |
| 83 "mdz", "mdr", "mdgz", "mdbz", "mod", "s3z", "s3r", "s3gz", "s3m", "xmz", "xmr", "xmgz", | 86 "mdz", "mdr", "mdgz", "mdbz", "mod", "s3z", "s3r", "s3gz", "s3m", "xmz", "xmr", "xmgz", |
| 84 "itz", "itr", "itgz", "dmf", "umx", "it", "669", "xm", "mtm", "psm", "ft2", NULL }; | 87 "itz", "itr", "itgz", "dmf", "umx", "it", "669", "xm", "mtm", "psm", "ft2", |
| 88 "zip", "gz", "bz2", "rar", "rb", | |
| 89 NULL }; | |
| 85 | 90 |
| 86 InputPlugin gModPlug = | 91 InputPlugin gModPlug = |
| 87 { | 92 { |
| 88 NULL, | 93 NULL, |
| 89 NULL, | 94 NULL, |
