changeset 2342:f140d0a27093 trunk

[svn] - use vfs_rewind() instead of vfs_fseek(fd, 0, seek_set) which was wrong - correct reporting in buffer_vfs_fread_impl/buffer_vfs_fwrite_impl
author nenolod
date Mon, 15 Jan 2007 19:24:54 -0800
parents 02a850a2533b
children 0df1a48b8fc4
files ChangeLog src/audacious/input.c src/audacious/vfs_buffer.c
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 15 18:33:42 2007 -0800
+++ b/ChangeLog	Mon Jan 15 19:24:54 2007 -0800
@@ -1,3 +1,13 @@
+2007-01-16 02:33:42 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [3692]
+  - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
+  
+  trunk/src/audacious/Makefile            |    1 
+  trunk/src/audacious/vfs_buffered_file.c |  175 ++++++++++++++++++++++++++++++++
+  trunk/src/audacious/vfs_buffered_file.h |   57 ++++++++++
+  3 files changed, 233 insertions(+)
+
+
 2007-01-15 20:39:22 +0000  Giacomo Lozito <james@develia.org>
   revision [3690]
   - added audacious_get_localdir() in util.c/h, returns a string with the full path of audacious local datadir
--- a/src/audacious/input.c	Mon Jan 15 18:33:42 2007 -0800
+++ b/src/audacious/input.c	Mon Jan 15 19:24:54 2007 -0800
@@ -434,7 +434,7 @@
         if (!ip || !input_is_enabled(ip->filename))
             continue;
 
-        vfs_fseek(fd, 0, SEEK_SET);
+        vfs_rewind(fd);
 
         if (cfg.use_extension_probing == TRUE && ip->vfs_extensions != NULL
         && ext != NULL && ext != (gpointer) 0x1 && use_ext_filter == TRUE)
--- a/src/audacious/vfs_buffer.c	Mon Jan 15 18:33:42 2007 -0800
+++ b/src/audacious/vfs_buffer.c	Mon Jan 15 19:24:54 2007 -0800
@@ -61,7 +61,7 @@
        read++;
     }
 
-    return (read / nmemb);
+    return (read / size);
 }
 
 size_t
@@ -86,7 +86,7 @@
        written++;
     }
 
-    return (written / nmemb);
+    return (written / size);
 }
 
 gint