Mercurial > audlegacy-plugins
changeset 259:56750b17f279 trunk
[svn] So input.c wants to have the old-style function available...
author | chainsaw |
---|---|
date | Sat, 18 Nov 2006 16:16:01 -0800 |
parents | 1987fda01d2a |
children | 4f7b72c88319 |
files | ChangeLog src/sexypsf/xmms.c |
diffstat | 2 files changed, 35 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Nov 18 16:09:09 2006 -0800 +++ b/ChangeLog Sat Nov 18 16:16:01 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-19 00:09:09 +0000 Tony Vroon <chainsaw@gentoo.org> + revision [540] + So input.c wants to have the old-style function available... + trunk/src/timidity/src/xmms-timidity.c | 75 ++++++++++++++++++++++----------- + trunk/src/timidity/src/xmms-timidity.h | 2 + 2 files changed, 52 insertions(+), 25 deletions(-) + + 2006-11-18 19:46:50 +0000 William Pitcock <nenolod@nenolod.net> revision [538] - NewVFS probe support
--- a/src/sexypsf/xmms.c Sat Nov 18 16:09:09 2006 -0800 +++ b/src/sexypsf/xmms.c Sat Nov 18 16:16:01 2006 -0800 @@ -52,17 +52,38 @@ return &sexypsf_ip; } -static int is_our_fd(gchar *filename, VFSFile *file) { - gchar magic[4]; - +static int is_our_file(gchar *filename) { + VFSFile *file; + gchar magic[4], *tmps; // Filter out psflib [we use them, but we can't play them] - gchar *tmps; static const gchar *teststr = "psflib"; if (strlen(teststr) < strlen(filename)) { tmps = filename + strlen(filename); tmps -= strlen(teststr); if (!strcasecmp(tmps, teststr)) - return 0; + return 0; + } + if ((file = vfs_fopen(filename,"rb"))) { + vfs_fread(magic,1,4,file); + //Only allow PSF1 for now. + if (!memcmp(magic,"PSF\x01",4)) { + vfs_fclose(file); + return 1; + } + vfs_fclose(file); + } + return 0; +} + +static int is_our_fd(gchar *filename, VFSFile *file) { + gchar magic[4], *tmps; + // Filter out psflib [we use them, but we can't play them] + static const gchar *teststr = "psflib"; + if (strlen(teststr) < strlen(filename)) { + tmps = filename + strlen(filename); + tmps -= strlen(teststr); + if (!strcasecmp(tmps, teststr)) + return 0; } vfs_fread(magic,1,4,file); //Only allow PSF1 for now. @@ -264,7 +285,7 @@ 0, 0, 0, - 0, + is_our_file, 0, sexypsf_xmms_play, sexypsf_xmms_stop,