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

 
 

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

Submitter:  Fardan Iqbal <fiqbal>
Submitted:  Thu 01 Jul 2010 02:28:07 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Fardan Iqbal Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 02 Jul 2010 09:31:06 PM UTC, comment #1: 
Rik <rik5>
Group 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 Files:
   
   
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
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by fiqbal (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-02 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2010-07-01 fiqbal Attached File- Added oddchunk.wav, #20862

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code