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

Submitter:  Hannes Müller <hmueller>
Submitted:  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
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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

I checked in your change here:

http://hg.savannah.gnu.org/hgweb/octave/rev/18cdf6479818

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

John W. Eaton <jwe>
Group 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:
   
   
Comment:
   

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)
  •  

    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 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.13-f8d8.
    Corresponding source code