<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Dear all,<br>
<br>
I'm trying to read data from a file (in this case a wave file) with
the following code (Scilab 6.0.1)<br>
<pre style="font-family:Monospaced;font-style:normal;font-size:14.0;"><span style="color:rgb(0,0,0);">fid</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(50,185,185);">mopen</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(188,143,143);">g:\Mis documentos\Ondas\440Hz_0.2s.wav</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">'</span><span style="color:rgb(188,143,143);">r</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);">mseek</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(0,0,0);">fid</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">h</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">mgeti</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1000</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(188,143,143);">uc</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">fid</span><span style="color:rgb(74,85,219);">)</span></pre>
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<br>
<br>
34 3E 34 3E <br>
<br>
(decimal 52 62 52 62)<br>
<br>
Then the following data and further data<br>
<br>
1A 3D 1A 3DÂ ...<br>
<br>
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.<br>
<br>
The same happens changing the way the file data are to be decoded.
Seems to get stuck when 1A or 1A 3D appears.<br>
<br>
Any idea of what may be going on and how to solve it?<br>
<br>
Federico Miyara<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"> <br>
<br>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
height="1"> </a></div>
</body>
</html>