bugGNU Octave - Bugs: bug #42519, wavread gives an extra sample from...

 
 

bug #42519: wavread gives an extra sample from 8-bit word-aligned data

Submitter:  Danilo de Jesus da Silva Bellini <danilobellini>
Submitted:  Sat 07 Jun 2014 01:01:38 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Danilo de Jesus da Silva Bellini Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 21 Feb 2015 05:31:39 PM UTC, comment #3: 

The wavread function is now a wrapper around audioread, and this issue is now resolved. Closing as fixed.

Mike Miller <mtmiller>
Group Member
Mon 12 Jan 2015 02:36:19 AM UTC, comment #2: 

The new audioread function can read both of the attached files and return a vector of length 7. Instead of fixing wavread.m, it should probably be rewritten as a wrapper around audioread now.

Mike Miller <mtmiller>
Group Member
Mon 16 Jun 2014 05:22:04 PM UTC, comment #1: 

wavread is just an m-file so it is pretty easy to debug things.  Could you take a look at identifying the problem?  Use the following code to set a breakpoint at line_number.


dbstop ("wavread", line_number)
wavread ("8.wav")


Also 'help debug' will give you information on how to use the debugger.

This site seemed to have a pretty good explanation of the WAV format: http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html


Rik <rik5>
Group administrator
Sat 07 Jun 2014 01:01:38 AM UTC, original submission:  

Wave files are word-aligned, yet the last extra align byte that could appear in an 8-bit sample width single channel wave file (i.e., a file with block align equals to 1) shoudn't appear as an extra -1 value (unsigned char zero mapped to a [-1;1) range) in the wavread resulting vector.

I've made two 7-samples 8bit wave files that reproduce this issue. The vector size when reading them from octave is 8.

Danilo de Jesus da Silva Bellini <danilobellini>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31519:  8.wav added by danilobellini (52B - audio/x-wav - 8.wav has RIFF size counting the last align byte, 8_sizeok.wav has RIFF size not counting that extra byte)
file #31520:  8_sizeok.wav added by danilobellini (52B - audio/x-wav - 8.wav has RIFF size counting the last align byte, 8_sizeok.wav has RIFF size not counting that extra byte)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by danilobellini (Submitted the item)
  • -email is unavailable- added by danilobellini
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-21 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
    2014-06-07 danilobellini Attached File- Added 8.wav, #31519
        Attached File- Added 8_sizeok.wav, #31520
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code