examples/sfexamples/oggvorbiscodec/src/libvorbis/doc/vorbisfile/ov_pcm_seek_page_lap.html

00001 <html>
00002 
00003 <head>
00004 <title>Vorbisfile - function - ov_pcm_seek_page_lap</title>
00005 <link rel=stylesheet href="style.css" type="text/css">
00006 </head>
00007 
00008 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
00009 <table border=0 width=100%>
00010 <tr>
00011 <td><p class=tiny>Vorbisfile documentation</p></td>
00012 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
00013 </tr>
00014 </table>
00015 
00016 <h1>ov_pcm_seek_page_lap</h1>
00017 
00018 <p><i>declared in "vorbis/vorbisfile.h";</i></p>
00019 
00020 <p>Seeks to the closest page preceding the specified location (in pcm
00021 samples) within the physical bitstream.  This variant of <a
00022 href="ov_pcm_seek_page.html">ov_pcm_seek_page</a> also automatically
00023 crosslaps the transition from the previous playback position into the
00024 new playback position in order to eliminate clicking and boundary
00025 discontinuities.  Otherwise, usage and behavior is identical to <a
00026 href="ov_pcm_seek_page.html">ov_pcm_seek_page</a>.
00027 
00028 <p>This function is faster than <a
00029 href="ov_pcm_seek_lap.html">ov_pcm_seek_lap</a> because the function
00030 can begin decoding at a page boundary rather than seeking through any
00031 remaining samples before the specified location.  However, it is less
00032 accurate.
00033 
00034 <p>ov_pcm_seek_page_lap also updates everything needed within the
00035 decoder, so you can immediately call <a
00036 href="ov_read.html">ov_read()</a> and get data from the newly seeked
00037 to position.
00038 
00039 <p>ov_pcm_seek_page_lap will lap between logical stream links of
00040 differing numbers of channels. Any extra channels from the origin of
00041 the seek are ignored; playback of these channels simply ends. Extra
00042 channels at the destination are lapped from silence.
00043 ov_pcm_seek_page_lap will also lap between logical stream links of
00044 differing sample rates.  In this case, the sample rates are ignored
00045 (no implicit resampling is done to match playback). It is up to the
00046 application developer to decide if this behavior makes any sense in a
00047 given context; in practical use, these default behaviors perform
00048 sensibly.
00049 
00050 <p>This function only works for seekable streams.
00051 
00052 <br><br>
00053 <table border=0 color=black cellspacing=0 cellpadding=7>
00054 <tr bgcolor=#cccccc>
00055         <td>
00056 <pre><b>
00057 int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos);
00058 </b></pre>
00059         </td>
00060 </tr>
00061 </table>
00062 
00063 <h3>Parameters</h3>
00064 <dl>
00065 <dt><i>vf</i></dt>
00066 <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile
00067 functions.</dd>
00068 <dt><i>pos</i></dt>
00069 <dd>Position in pcm samples to seek to in the bitstream.</dd>
00070 </dl>
00071 
00072 
00073 <h3>Return Values</h3>
00074 <blockquote>
00075 <ul>
00076 <li>0 for success</li>
00077 
00078 <li>
00079 nonzero indicates failure, described by several error codes:
00080   <ul>
00081   <li>OV_ENOSEEK - Bitstream is not seekable.
00082   </li>
00083   <li>OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open.
00084   </li>
00085   <li>OV_EREAD - A read from media returned an error.
00086   </li>
00087   <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack 
00088                 corruption.
00089   </li>
00090   <li>OV_EOF - Indicates stream is at end of file immediately after a seek 
00091   (making crosslap impossible as there's no preceeding decode state to crosslap).
00092   </li>
00093   <li>OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt. 
00094   </li>
00095   </ul></li>
00096 </ul></blockquote>
00097 
00098 <br><br>
00099 <hr noshade>
00100 <table border=0 width=100%>
00101 <tr valign=top>
00102 <td><p class=tiny>copyright &copy; 2003 Xiph.org</p></td>
00103 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
00104 </tr><tr>
00105 <td><p class=tiny>Vorbisfile documentation</p></td>
00106 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
00107 </tr>
00108 </table>
00109 
00110 </body>
00111 
00112 </html>

Generated by  doxygen 1.6.2