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:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Hannes Müller Open/Closed:  Closed
Release:  dev Operating 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 Files:

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
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by hmueller (Submitted the item)

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

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-25 hmueller Attached File- => Added test_file_bug_34078.wav, #23869
    2011-08-24 jwe StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2011-08-22 hmueller Attached File- => Added wavread.m.patch, #23847
    2011-08-22 rik5 StatusNone => Patch Submitted
    2011-08-20 hmueller Attached File- => Added wavread.m.patch, #23839

    Back to the top

    Powered by Savane 3.4