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