One more thing, which I forgot to mention...<br><br>... I don&#39;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&#39;s undefined.<br>
<br>If it&#39;s the former (impl-defined) and you&#39;re feeling paranoid, you can always just do the thing I&#39;ve specified in the previous email -- what&#39;s important is that it&#39;s consistent.<br>If it&#39;s the latter (undefined), you don&#39;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&#39;s in theory anyways -- in practice, as stated, I highly doubt the API would do such a nasty thing due to the aforementioned reasons.<br><br><div class="gmail_quote">On 3 December 2012 17:23, Tim Čas <span dir="ltr">&lt;<a href="mailto:darkuranium@gmail.com" target="_blank">darkuranium@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;m pretty sure you can&#39;t seek before the beginning of a file w/ fseek anyways (and I don&#39;t see why the OGG API would want to seek there in the first place).<br>
<br>If you *really* want to, say, make seeking before the beginning possible, you could do something like:<br>
<br><div style="margin-left:40px"><span style="font-family:courier new,monospace">if(type == SEEK_CUR)<br>{<br>    if(pos &lt; -diff) // in other words, if `pos + diff` would be negative<br>        pos = 0;<br>    else<br>

        pos += diff;<br>}<br></span></div><br>...but, given that Vorbis won&#39;t ask for a seek before the start with overwhelming probability (since fseek doesn&#39;t allow that either, and besides -- what would you read from there?), I think such checks would be redundant.<br>

<br><div class="gmail_quote"><div><div class="h5">On 3 December 2012 17:15, fy <span dir="ltr">&lt;<a href="mailto:fy0748@gmail.com" target="_blank">fy0748@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<u></u>


<div>在 Tue, 04 Dec 2012 00:11:44 +0800,Tim Čas &lt;<a href="mailto:darkuranium@gmail.com" target="_blank">darkuranium@gmail.com</a>&gt; 写道:<div><br><br><blockquote style="margin:0 0 0.80ex;border-left:#0000ff 2px solid;padding-left:1ex">

Well, see the answer in that SO.com question -- use `PHYSFS_tell()` to get the current location, calculate the pos according to `type` (see `AR_seekOgg()` in that answer), and then use `PHYSFS_seek()`.<br></blockquote><div>

<br></div></div><div>I considered. But PHYSFS_uint64 can not save a negative number.<br></div><br><div><div>-- </div><div>使用Opera的电子邮件客户端:<a href="http://www.opera.com/mail/" target="_blank">http://www.opera.com/mail/</a></div>

</div></div><br></div></div><div class="im">_______________________________________________<br>
physfs mailing list<br>
<a href="mailto:physfs@icculus.org" target="_blank">physfs@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/physfs" target="_blank">http://icculus.org/mailman/listinfo/physfs</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>