# HG changeset patch # User William Pitcock # Date 1241091679 18000 # Node ID 85a35e03b0c9815e424ea6a360086fd3a81f423f # Parent 27e2dbb89226a3cf6daaa10adb7d021eed1c948a wavpack: Take advantage of aud_vfs_fsize() and aud_vfs_is_streaming() APIs. diff -r 27e2dbb89226 -r 85a35e03b0c9 src/wavpack/libwavpack.cxx --- a/src/wavpack/libwavpack.cxx Thu Apr 30 06:14:00 2009 -0500 +++ b/src/wavpack/libwavpack.cxx Thu Apr 30 06:41:19 2009 -0500 @@ -113,22 +113,16 @@ guint32 get_length (void *id) { VFSFile *file = (VFSFile *) id; - guint32 sz = 0; if (file == NULL) return 0; - aud_vfs_fseek(file, 0, SEEK_END); - sz = aud_vfs_ftell(file); - aud_vfs_fseek(file, 0, SEEK_SET); - - return sz; + return aud_vfs_fsize (file); } -/* XXX streams?? */ gint can_seek (void *id) { - return 1; + return (aud_vfs_is_streaming ((VFSFile *) id) == FALSE); } gint32 write_bytes (void *id, void *data, gint32 bcount)