changeset 7461:da8e4aa06134

limit data read to data chunk in wavread.m
author John W. Eaton <jwe@octave.org>
date Fri, 08 Feb 2008 03:43:48 -0500
parents cb8d75cedc93
children dfcaf7ed48e3
files scripts/ChangeLog scripts/audio/wavread.m
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Fri Feb 08 03:28:11 2008 -0500
+++ b/scripts/ChangeLog	Fri Feb 08 03:43:48 2008 -0500
@@ -1,3 +1,7 @@
+2008-02-08  Julien Pommier  <pommier@pianoteq.com>
+
+	* audio/wavread.m: Limit data read to end of data chunk.
+
 2008-02-01  Dave Goel  <deego3@gmail.com>
 
 	* signal/arch_rnd.m: Correctly index E and Y vectors.
--- a/scripts/audio/wavread.m	Fri Feb 08 03:28:11 2008 -0500
+++ b/scripts/audio/wavread.m	Fri Feb 08 03:43:48 2008 -0500
@@ -151,7 +151,7 @@
   
   ## parse arguments
   if (nargin == 1)
-    length = inf;
+    length = 8 * ck_size / bits_per_sample;
   else
     if (size (param, 2) == 1)
       ## number of samples is given