[Scilab-users] Possible bug in wavread

Federico Miyara fmiyara at fceia.unr.edu.ar
Sun Feb 24 07:11:49 CET 2019


Dear all,

When opening a wav file with wavread, even with the option 'info', 
seemingly it does not recognize the file as a valid wav file if it is 
encoded with a category different from PCM.

For instance, I've created a simple wave file, opened it with Audacity 
(a free open-source audio editor) and exported it with mu-law encoding, 
getting the attached file.

Wavread with the option 'info' behaves like this:

--> H = wavread('c:\test mu-law.wav', 'info')
at line    16 of function read_wavefmt ( C:\Program 
Files\scilab-6.0.2\modules\sound\macros\wavread.sci line 186 )
at line   113 of function wavread      ( C:\Program 
Files\scilab-6.0.2\modules\sound\macros\wavread.sci line 128 )

find_cktype: An error occurred: Invalid wav format.

I think this behavior is not correct, since my file is indeed a valid 
wav file (I successfully opened it with other audio editor).

 From this and other similar experiments I conclude that the only 
encoding category Scilab supports is PCM (no compression). This may be 
OK to keep the function simple (there are literally dozens of formats 
that can be contained in a wav file), but the documentation should warn 
about that and the error message should be more accurate, informing that 
it is an unsupported format, instead of providing a misleading report 
telling that the format is invalid.

Regards,

Federico Miyara



---
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190224/901c6b23/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test mu-law.wav
Type: audio/x-wav
Size: 8880 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20190224/901c6b23/attachment.wav>


More information about the users mailing list