Home | History | Annotate | Download | only in vorbisfile
      1 <html>
      2 
      3 <head>
      4 <title>Vorbisfile - function - ov_pcm_seek_page</title>
      5 <link rel=stylesheet href="style.css" type="text/css">
      6 </head>
      7 
      8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
      9 <table border=0 width=100%>
     10 <tr>
     11 <td><p class=tiny>Vorbisfile documentation</p></td>
     12 <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td>
     13 </tr>
     14 </table>
     15 
     16 <h1>ov_pcm_seek_page</h1>
     17 
     18 <p><i>declared in "vorbis/vorbisfile.h";</i></p>
     19 
     20 <p>Seeks to the closest page preceding the specified location (in pcm samples) within the physical bitstream.  This function only works for seekable streams.
     21 <p>This function is faster than <a href="ov_pcm_seek.html">ov_pcm_seek</a> because the function can begin decoding at a page boundary rather than seeking through any remaining samples before the specified location.  However, it is less accurate.
     22 <p>This also updates everything needed within the
     23 decoder, so you can immediately call <a href="ov_read.html">ov_read()</a> and get data from
     24 the newly seeked to position.
     25 <p>
     26 
     27 <br><br>
     28 <table border=0 color=black cellspacing=0 cellpadding=7>
     29 <tr bgcolor=#cccccc>
     30 	<td>
     31 <pre><b>
     32 int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
     33 </b></pre>
     34 	</td>
     35 </tr>
     36 </table>
     37 
     38 <h3>Parameters</h3>
     39 <dl>
     40 <dt><i>vf</i></dt>
     41 <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile
     42 functions.</dd>
     43 <dt><i>pos</i></dt>
     44 <dd>Position in pcm samples to seek to in the bitstream.</dd>
     45 </dl>
     46 
     47 
     48 <h3>Return Values</h3>
     49 <blockquote>
     50 <ul>
     51 <li>0 for success</li>
     52 
     53 <li>
     54 nonzero indicates failure, described by several error codes:
     55   <ul>
     56   <li>OV_ENOSEEK - Bitstream is not seekable.
     57   </li>
     58   <li>OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open.
     59   </li>
     60   <li>OV_EREAD - A read from media returned an error.
     61   </li>
     62   <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack 
     63 		corruption.
     64   </li>
     65   <li>OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt. 
     66   </li>
     67   </ul></li>
     68 </ul></blockquote>
     69 
     70 <br><br>
     71 <hr noshade>
     72 <table border=0 width=100%>
     73 <tr valign=top>
     74 <td><p class=tiny>copyright &copy; 2007 Xiph.org</p></td>
     75 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
     76 </tr><tr>
     77 <td><p class=tiny>Vorbisfile documentation</p></td>
     78 <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td>
     79 </tr>
     80 </table>
     81 
     82 </body>
     83 
     84 </html>
     85