00001 <html> 00002 00003 <head> 00004 <title>Vorbisfile - Seeking</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>Seeking</h1> 00017 <p>Seeking functions allow you to specify a specific point in the stream to begin or continue decoding. 00018 <p> 00019 All libvorbisfile seeking routines are declared in "vorbis/vorbisfile.h". 00020 00021 <p>Certain seeking functions are best suited to different situations. 00022 When speed is important and exact positioning isn't required, 00023 page-level seeking should be used. Note also that Vorbis files do not 00024 necessarily start at a sample number or time offset of zero. Do not 00025 be surprised if a file begins at a positive offset of several minutes 00026 or hours, such as would happen if a large stream (such as a concert 00027 recording) is chopped into multiple separate files. Requesting to 00028 seek to a position before the beginning of such a file will seek to 00029 the position where audio begins. 00030 00031 <p>As of vorbisfile version 1.68, seeking also optionally provides 00032 automatic crosslapping to eliminate clicks and other discontinuity 00033 artifacts at seeking boundaries. This fetaure is of particular 00034 interest to player and game developers implementing dynamic music and 00035 audio engines, or others looking for smooth transitions within a 00036 single sample or across multiple samples.<p> 00037 00038 <p>Naturally, seeking is available only within a seekable file or 00039 stream. Seeking functions will return <tt>OV_ENOSEEK</tt> on 00040 nonseekable files and streams. 00041 00042 </ul> 00043 00044 <table border=1 color=black width=50% cellspacing=0 cellpadding=7> 00045 <tr bgcolor=#cccccc> 00046 <td><b>function</b></td> 00047 <td><b>purpose</b></td> 00048 </tr> 00049 <tr valign=top> 00050 <td><a href="ov_raw_seek.html">ov_raw_seek</a></td> 00051 <td>This function seeks to a position specified in the compressed bitstream, specified in bytes.</td> 00052 </tr> 00053 <tr valign=top> 00054 <td><a href="ov_pcm_seek.html">ov_pcm_seek</a></td> 00055 <td>This function seeks to a specific audio sample number, specified in pcm samples.</td> 00056 </tr> 00057 <tr valign=top> 00058 <td><a href="ov_pcm_seek_page.html">ov_pcm_seek_page</a></td> 00059 <td>This function seeks to the closest page preceding the specified audio sample number, specified in pcm samples.</td> 00060 </tr> 00061 <tr valign=top> 00062 <td><a href="ov_time_seek.html">ov_time_seek</a></td> 00063 <td>This function seeks to the specific time location in the bitstream, specified in seconds </td> 00064 </tr> 00065 <tr valign=top> 00066 <td><a href="ov_time_seek_page.html">ov_time_seek_page</a></td> 00067 <td>This function seeks to the closest page preceding the specified time position in the bitstream</td> 00068 </tr> 00069 00070 </tr> 00071 <tr valign=top> 00072 <td><a href="ov_raw_seek_lap.html">ov_raw_seek_lap</a></td> 00073 <td>This function seeks to a position specified in the compressed bitstream, specified in bytes. The boundary between the old and new playback positions is crosslapped to eliminate discontinuities. </td> 00074 </tr> 00075 <tr valign=top> 00076 <td><a href="ov_pcm_seek_lap.html">ov_pcm_seek_lap</a></td> 00077 <td>This function seeks to a specific audio sample number, specified in pcm samples. The boundary between the old and new playback positions is crosslapped to eliminate discontinuities.</td> 00078 </tr> 00079 <tr valign=top> 00080 <td><a href="ov_pcm_seek_page_lap.html">ov_pcm_seek_page_lap</a></td> 00081 <td>This function seeks to the closest page preceding the specified audio sample number, specified in pcm samples. The boundary between the old and new playback positions is crosslapped to eliminate discontinuities.</td> 00082 </tr> 00083 <tr valign=top> 00084 <td><a href="ov_time_seek_lap.html">ov_time_seek_lap</a></td> 00085 <td>This function seeks to the specific time location in the bitstream, specified in seconds. The boundary between the old and new playback positions is crosslapped to eliminate discontinuities. </td> 00086 </tr> 00087 <tr valign=top> 00088 <td><a href="ov_time_seek_page_lap.html">ov_time_seek_page_lap</a></td> 00089 <td>This function seeks to the closest page preceding the specified time position in the bitstream. The boundary between the old and new playback positions is crosslapped to eliminate discontinuities.</td> 00090 </tr> 00091 </table> 00092 00093 <br><br> 00094 <hr noshade> 00095 <table border=0 width=100%> 00096 <tr valign=top> 00097 <td><p class=tiny>copyright © 2003 Xiph.org</p></td> 00098 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td> 00099 </tr><tr> 00100 <td><p class=tiny>Vorbisfile documentation</p></td> 00101 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td> 00102 </tr> 00103 </table> 00104 00105 </body> 00106 00107 </html>