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