1 | <html> |
---|
2 | |
---|
3 | <head> |
---|
4 | <title>Vorbisfile - function - ov_pcm_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_pcm_seek_page_lap</h1> |
---|
17 | |
---|
18 | <p><i>declared in "vorbis/vorbisfile.h";</i></p> |
---|
19 | |
---|
20 | <p>Seeks to the closest page preceding the specified location (in pcm |
---|
21 | samples) within the physical bitstream. This variant of <a |
---|
22 | href="ov_pcm_seek_page.html">ov_pcm_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_pcm_seek_page.html">ov_pcm_seek_page</a>. |
---|
27 | |
---|
28 | <p>This function is faster than <a |
---|
29 | href="ov_pcm_seek_lap.html">ov_pcm_seek_lap</a> because the function |
---|
30 | can begin decoding at a page boundary rather than seeking through any |
---|
31 | remaining samples before the specified location. However, it is less |
---|
32 | accurate. |
---|
33 | |
---|
34 | <p>ov_pcm_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_pcm_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_pcm_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 only works for seekable 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_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos); |
---|
58 | </b></pre> |
---|
59 | </td> |
---|
60 | </tr> |
---|
61 | </table> |
---|
62 | |
---|
63 | <h3>Parameters</h3> |
---|
64 | <dl> |
---|
65 | <dt><i>vf</i></dt> |
---|
66 | <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile |
---|
67 | functions.</dd> |
---|
68 | <dt><i>pos</i></dt> |
---|
69 | <dd>Position in pcm samples to seek to in the bitstream.</dd> |
---|
70 | </dl> |
---|
71 | |
---|
72 | |
---|
73 | <h3>Return Values</h3> |
---|
74 | <blockquote> |
---|
75 | <ul> |
---|
76 | <li>0 for success</li> |
---|
77 | |
---|
78 | <li> |
---|
79 | nonzero indicates failure, described by several error codes: |
---|
80 | <ul> |
---|
81 | <li>OV_ENOSEEK - Bitstream is not seekable. |
---|
82 | </li> |
---|
83 | <li>OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open. |
---|
84 | </li> |
---|
85 | <li>OV_EREAD - A read from media returned an error. |
---|
86 | </li> |
---|
87 | <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack |
---|
88 | corruption. |
---|
89 | </li> |
---|
90 | <li>OV_EOF - Indicates stream is at end of file immediately after a seek |
---|
91 | (making crosslap impossible as there's no preceeding decode state to crosslap). |
---|
92 | </li> |
---|
93 | <li>OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt. |
---|
94 | </li> |
---|
95 | </ul></li> |
---|
96 | </ul></blockquote> |
---|
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> |
---|