Hello everybody, <br>I&#39;m new to this mailing list so I&#39;m sorry if it&#39;s the wrong place to post this. <br><br>I&#39;m developing a Speex player and I need to seek with a precision of milliseconds. I used liboggz that supposedly does just that, but it never seeks exactly where it should. For example if I use oggz_seek_units(oggz, 18450, SEEK_SET) result it&#39;s 16386 and there is a delay between the playback and the moment where it should start. Only when I seek to position 0 I get the desired result. <br>
<br>I&#39;ve also used ogg_page_granulepos for seeking but it seems more difficult to use. I use something like this: <br>        <br>    do<br>    {        <br>        while (ogg_sync_pageout(&amp;oy, &amp;og) != 1)<br>        {<br>
            data = ogg_sync_buffer(&amp;oy, 512);<br>            readbytes = fread(data, 1, 512, spxfile);<br>            ogg_sync_wrote(&amp;oy, readbytes);<br>        }                <br>        //printf(&quot;ogg_page_granulepos: %lld\n&quot;, ogg_page_granulepos(&amp;og));<br>
    }     <br>    while (ogg_page_granulepos(&amp;og) &lt; time * freq); // time in seconds, freq: 16000<br><br>But this way I can&#39;t get enough precision neither. <br><br>Could anyone give me some idea of what could I do to get a high precision when seeking? <br>
<br>Thank you, <br>Arnau <br clear="all"><br><br>