<!DOCTYPE html><html><head>
<style type="text/css">body { font-family:'宋体'; font-size:13px}</style>
</head>
<body>在 Tue, 04 Dec 2012 00:27:45 +0800,Tim Čas &lt;darkuranium@gmail.com&gt; 写道:<br><br><blockquote style="margin: 0 0 0.80ex; border-left: #0000FF 2px solid; padding-left: 1ex">One more thing, which I forgot to mention...<br><br>... I don't know whether seeking w/ fseek before the start of file is implementation-defined or straight out undefined. In either case, the Vorbis API should not be doing the former because of portability concerns, and should not be doing the latter because, well, it's undefined.<br>
<br>If it's the former (impl-defined) and you're feeling paranoid, you can always just do the thing I've specified in the previous email -- what's important is that it's consistent.<br>If it's the latter (undefined), you don't need to worry about handling it at all, since for all the standard cares, it could summon (in the case of fseek) nasal demons.<br>
<br>That's in theory anyways -- in practice, as stated, I highly doubt the API would do such a nasty thing due to the aforementioned reasons.</blockquote><div><br></div><div>OK. Now I tired, but failed.</div><div><br></div><div>Then I load whole file into memory.I got a record of func calls by codes of stackoverflow :</div><div><br></div><div>SEEK_END<br>SEEK_END<br>SEEK_SET<br>SEEK_SET</div><div><br></div><div>The "fromwhere" parameter&nbsp;is REALLY&nbsp;needed.</div><div><br></div><div><br></div><div>As&nbsp;to this code snippet,</div><div><br></div><div>&gt; if(type == SEEK_CUR)<br>&gt; {<br>&gt; if(pos &lt; -diff) // in other words, if `pos + diff` would be negative<br>&gt; pos = 0;<br>&gt; else<br>&gt; pos += diff;<br>&gt; }</div><div><br></div><div>It can't be so easy.</div><div><br></div><div><br></div><div>Anyway the problem is&nbsp;solved, not in the best way.</div><div><br></div><div>So I think it should be patched.</div><div><br></div><div><br></div><div id="M2Signature"><div>-- </div><div>使用Opera的电子邮件客户端:<a href="http://www.opera.com/mail/">http://www.opera.com/mail/</a></div></div></body></html>