[Scilab-users] Unexpected END OF FILE

Federico Miyara fmiyara at fceia.unr.edu.ar
Wed Jan 30 23:02:52 CET 2019


Dear all,

I'm trying to read data from a file (in this case a wave file) with the 
following code (Scilab 6.0.1)

fid  =  mopen('g:\Mis documentos\Ondas\440Hz_0.2s.wav',  'r')
mseek(0,  fid)
h  =  mgeti(1000,'uc',fid)

I should get a vector with 1000 unsigned 1 byte integer components but I 
end with only 164 entries. Viewing the file with an hex viewer, the last 
correctly read data are

34 3E 34 3E

(decimal 52 62 52 62)

Then the following data and further data

1A 3D 1A 3DÂ  ...

are not read at all. No warning like having reached EOF. By the way, the 
repeated pairs are because it is a stereo file with identical left and 
right channels.

The same happens changing the way the file data are to be decoded. Seems 
to get stuck when 1A or 1A 3D appears.

Any idea of what may be going on and how to solve it?

Federico Miyara


<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


---
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/20190130/be290b46/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 440Hz_0.2s.wav
Type: audio/x-wav
Size: 40332 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20190130/be290b46/attachment.wav>


More information about the users mailing list