bugGNU Octave - Bugs: bug #34078, fix for wavread.m, handle also...


bug #34078: fix for wavread.m, handle also incomplete samples for 24 bits per sample

Submitted by:  Hannes Müller <hmueller>
Submitted on:  Sat 20 Aug 2011 09:22:23 AM UTC  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Hannes MüllerOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

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


Wed 24 Aug 2011 06:12:45 PM UTC, comment #2:

I checked in your change here:


It would be helpful to have a test for this case. Could you create one?

John W. Eaton <jwe>
Project Administrator
Sat 20 Aug 2011 09:35:44 AM UTC, comment #1:

The sample file test.wav does not appear as attachment. I assume because it is no text file. If there is need to provide this file please give a hint how to do so.

Hannes Müller <hmueller>
Sat 20 Aug 2011 09:22:23 AM UTC, original submission:

wavread.m assumes the data size of a .wav file is a multiple of the bytes used per sample. In fact there are .wav files were this assumption does not hold. The last sample may be incomplete (ref. attached file test.wav from a sound level meter).
Therefore, with such *.wav files the reshape operation in current wavread.m fails.
Matlab, audacity, sndfile library and a number of other audio applications does not show any failure or warnings with theses files.
That is why I propose to fix wavread.m accordingly, see attached patch.

PS: I propose to check also all other divisions if non-integer results are correctly handled.

Hannes Müller <hmueller>


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

Attach File(s):

Attached Files
file #23869:  test_file_bug_34078.wav added by hmueller (24KiB - audio/x-wav - test file to reproduce the bug)
file #23847:  wavread.m.patch added by hmueller (650B - text/x-patch - patch updated to work with latest version of wavread.m in repository)
file #23839:  wavread.m.patch added by hmueller (652B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by hmueller (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 25 Aug 2011 05:20:43 PM UTChmuellerAttached File-=>Added test_file_bug_34078.wav, #23869
    Wed 24 Aug 2011 06:12:45 PM UTCjweStatusPatch Submitted=>Fixed
    Mon 22 Aug 2011 06:08:03 PM UTChmuellerAttached File-=>Added wavread.m.patch, #23847
    Mon 22 Aug 2011 04:54:53 AM UTCrik5StatusNone=>Patch Submitted
    Sat 20 Aug 2011 09:22:23 AM UTChmuellerAttached File-=>Added wavread.m.patch, #23839

    Back to the top

    Powered by Savane 3.1-cleanup1