Mercurial > audlegacy-plugins
changeset 263:7e1d5cc9ef1b trunk
[svn] - fix wavpack plugin
author | nenolod |
---|---|
date | Sat, 18 Nov 2006 18:56:23 -0800 |
parents | f653f1219db2 |
children | 1e6e497e039f |
files | ChangeLog src/wavpack/libwavpack.cxx |
diffstat | 2 files changed, 27 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Nov 18 16:29:50 2006 -0800 +++ b/ChangeLog Sat Nov 18 18:56:23 2006 -0800 @@ -1,3 +1,10 @@ +2006-11-19 00:29:50 +0000 Tony Vroon <chainsaw@gentoo.org> + revision [548] + So input.c wants to have the old-style function available... + trunk/src/aac/src/libmp4.c | 36 +++++++++++++++++++++++++++++++++++- + 1 file changed, 35 insertions(+), 1 deletion(-) + + 2006-11-19 00:26:08 +0000 Tony Vroon <chainsaw@gentoo.org> revision [546] So input.c wants to have the old-style function available...
--- a/src/wavpack/libwavpack.cxx Sat Nov 18 16:29:50 2006 -0800 +++ b/src/wavpack/libwavpack.cxx Sat Nov 18 18:56:23 2006 -0800 @@ -31,6 +31,7 @@ extern "C" InputPlugin * get_iplugin_info(void); static void wv_load_config(); +static int wv_is_our_file(gchar *filename); static int wv_is_our_fd(gchar *filename, VFSFile *file); static void wv_play(char *); static void wv_stop(void); @@ -63,7 +64,7 @@ wv_load_config, wv_about_box, wv_configure, - NULL, //old style is_our_file + wv_is_our_file, //old style is_our_file NULL, //no use wv_play, wv_stop, @@ -79,7 +80,7 @@ NULL, NULL, wv_get_song_info, - wv_file_info_box, //info box + wv_file_info_box, //info box NULL, //output wv_get_song_tuple, NULL, @@ -262,6 +263,23 @@ return FALSE; } +static int +wv_is_our_file(gchar *filename) +{ + VFSFile *file = vfs_fopen(filename, "rb"); + gchar magic[4]; + + if (!file) + return FALSE; + + vfs_fread(magic,1,4,file); + + if (!memcmp(magic,"wvpk",4)) + return TRUE; + + return FALSE; +} + void load_tag(ape_tag *tag, WavpackContext *ctx) {