bugGNU Octave - Bugs: bug #30309, Function wavread() fails for wave...

 
 

bug #30309: Function wavread() fails for wave files with odd-sized RIFF chunks.

Submitted by:  Fardan Iqbal <fiqbal>
Submitted on:  Thu 01 Jul 2010 02:28:07 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Fardan IqbalOpen/Closed: Closed
Release: 3.2.3Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 02 Jul 2010 09:31:06 PM UTC, comment #1:

Fixed in this changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/a4b8364e04c7

Rik <rik5>
Project Administrator
Thu 01 Jul 2010 02:28:07 AM UTC, original submission:

The `wavread()' function (defined in wavread.m) fails with an error message saying "file contains no data chunk". This happens when you try to read a wave file that has an odd-sized RIFF chunk before the main data chunk.

After looking at wavread.m, it looks like the cause of this problem is that the `find_chunk()' function (used by `wavread()') does not account for the padding byte that well-formed wave files must have at the end of odd-sized chunks.

A possible fix is to round the `chunk_size' variable up to an even number before adding it to `offset' in the `find_chunk()' function.

Attached to this report is a wave file that demonstrates the problem. This file contains a 79-byte list chunk with a padding byte at the end. Typing the following command:

Y = wavread("oddchunk.wav")

will cause the error.

This bug was discovered on Fedora Core 12 running on x86_64. Octave was configured for "x86_64-redhat-linux-gnu".

Fardan Iqbal <fiqbal>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #20862:  oddchunk.wav added by fiqbal (454KiB - audio/x-wav)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by fiqbal (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 02 Jul 2010 09:31:06 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 01 Jul 2010 02:28:07 AM UTCfiqbalAttached File-=>Added oddchunk.wav, #20862

    Back to the top


    Powered by Savane 3.1-cleanup1