[16] | 1 | <html> |
---|
| 2 | |
---|
| 3 | <head> |
---|
| 4 | <title>Vorbisfile - function - ov_time_seek_page_lap</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_time_seek_page_lap</h1> |
---|
| 17 | |
---|
| 18 | <p><i>declared in "vorbis/vorbisfile.h";</i></p> |
---|
| 19 | |
---|
| 20 | <p>For seekable streams, ov_time_seek_page_lap seeks to the closest |
---|
| 21 | full page preceeding the given time. This variant of <a |
---|
| 22 | href="ov_time_seek_page.html">ov_time_seek_page</a> also automatically |
---|
| 23 | crosslaps the transition from the previous playback position into the |
---|
| 24 | new playback position in order to eliminate clicking and boundary |
---|
| 25 | discontinuities. Otherwise, usage and behavior is identical to <a |
---|
| 26 | href="ov_time_seek_page.html">ov_time_seek_page</a>. |
---|
| 27 | |
---|
| 28 | <p>ov_time_seek_page_lap is faster than <a |
---|
| 29 | href="ov_time_seek_lap.html">ov_time_seek_lap</a> because it doesn't |
---|
| 30 | seek through the last few samples to reach an exact time, but it is |
---|
| 31 | also less accurate. This should be used when speed is important, but |
---|
| 32 | crosslapping is still desired. |
---|
| 33 | |
---|
| 34 | <p>ov_time_seek_page_lap also updates everything needed within the |
---|
| 35 | decoder, so you can immediately call <a |
---|
| 36 | href="ov_read.html">ov_read()</a> and get data from the newly seeked |
---|
| 37 | to position. |
---|
| 38 | |
---|
| 39 | <p>ov_time_seek_page_lap will lap between logical stream links of |
---|
| 40 | differing numbers of channels. Any extra channels from the origin of |
---|
| 41 | the seek are ignored; playback of these channels simply ends. Extra |
---|
| 42 | channels at the destination are lapped from silence. |
---|
| 43 | ov_time_seek_page_lap will also lap between logical stream links of |
---|
| 44 | differing sample rates. In this case, the sample rates are ignored |
---|
| 45 | (no implicit resampling is done to match playback). It is up to the |
---|
| 46 | application developer to decide if this behavior makes any sense in a |
---|
| 47 | given context; in practical use, these default behaviors perform |
---|
| 48 | sensibly. |
---|
| 49 | |
---|
| 50 | <p>This function does not work for unseekable streams. |
---|
| 51 | |
---|
| 52 | <br><br> |
---|
| 53 | <table border=0 color=black cellspacing=0 cellpadding=7> |
---|
| 54 | <tr bgcolor=#cccccc> |
---|
| 55 | <td> |
---|
| 56 | <pre><b> |
---|
| 57 | int ov_time_seek_page_lap(<a href="OggVorbis_File.html">OggVorbis_File</a> *vf, double s); |
---|
| 58 | </b></pre> |
---|
| 59 | </td> |
---|
| 60 | </tr> |
---|
| 61 | </table> |
---|
| 62 | |
---|
| 63 | <h3>Parameters</h3> |
---|
| 64 | <dl> |
---|
| 65 | <dt><i>vf</i></dt> |
---|
| 66 | <dd>Pointer to our already opened and initialized OggVorbis_File structure.</dd> |
---|
| 67 | <dt><i>ms</i></dt> |
---|
| 68 | <dd>Location to seek to within the file, specified in seconds.</dd> |
---|
| 69 | </dl> |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | <h3>Return Values</h3> |
---|
| 73 | <blockquote> |
---|
| 74 | <ul> |
---|
| 75 | <li>0 for success</li> |
---|
| 76 | |
---|
| 77 | <li> |
---|
| 78 | nonzero indicates failure, described by several error codes: |
---|
| 79 | <ul> |
---|
| 80 | <li>OV_ENOSEEK - Bitstream is not seekable. |
---|
| 81 | </li> |
---|
| 82 | <li>OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open. |
---|
| 83 | </li> |
---|
| 84 | <li>OV_EREAD - A read from media returned an error. |
---|
| 85 | </li> |
---|
| 86 | <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack |
---|
| 87 | corruption. |
---|
| 88 | </li> |
---|
| 89 | <li>OV_EOF - Indicates stream is at end of file immediately after a seek |
---|
| 90 | (making crosslap impossible as there's no preceeding decode state to crosslap). |
---|
| 91 | </li> |
---|
| 92 | <li>OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt. |
---|
| 93 | </li> |
---|
| 94 | </ul></li> |
---|
| 95 | </ul></blockquote> |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | <br><br> |
---|
| 99 | <hr noshade> |
---|
| 100 | <table border=0 width=100%> |
---|
| 101 | <tr valign=top> |
---|
| 102 | <td><p class=tiny>copyright © 2007 Xiph.org</p></td> |
---|
| 103 | <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td> |
---|
| 104 | </tr><tr> |
---|
| 105 | <td><p class=tiny>Vorbisfile documentation</p></td> |
---|
| 106 | <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td> |
---|
| 107 | </tr> |
---|
| 108 | </table> |
---|
| 109 | |
---|
| 110 | </body> |
---|
| 111 | |
---|
| 112 | </html> |
---|