changeset 3089:85a35e03b0c9

wavpack: Take advantage of aud_vfs_fsize() and aud_vfs_is_streaming() APIs.
author William Pitcock <nenolod@atheme.org>
date Thu, 30 Apr 2009 06:41:19 -0500
parents 27e2dbb89226
children 528e08654016
files src/wavpack/libwavpack.cxx
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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)