summaryrefslogtreecommitdiffhomepage
path: root/contrib/vorbis/doc/vorbisfile/seeking.html
blob: 17e4e82350a4ee5683acf9143b01fd28d5f609d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<html>

<head>
<title>Vorbisfile - Seeking</title>
<link rel=stylesheet href="style.css" type="text/css">
</head>

<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
<table border=0 width=100%>
<tr>
<td><p class=tiny>Vorbisfile documentation</p></td>
<td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
</tr>
</table>

<h1>Seeking</h1>
<p>Seeking functions allow you to specify a specific point in the stream to begin or continue decoding.
<p>
All libvorbisfile seeking routines are declared in "vorbis/vorbisfile.h".

<p>Certain seeking functions are best suited to different situations.
When speed is important and exact positioning isn't required,
page-level seeking should be used.  Note also that Vorbis files do not
necessarily start at a sample number or time offset of zero.  Do not
be surprised if a file begins at a positive offset of several minutes
or hours, such as would happen if a large stream (such as a concert
recording) is chopped into multiple separate files.  Requesting to
seek to a position before the beginning of such a file will seek to
the position where audio begins.

<p>As of vorbisfile version 1.68, seeking also optionally provides
automatic crosslapping to eliminate clicks and other discontinuity
artifacts at seeking boundaries.  This fetaure is of particular
interest to player and game developers implementing dynamic music and
audio engines, or others looking for smooth transitions within a
single sample or across multiple samples.<p>

<p>Naturally, seeking is available only within a seekable file or
stream.  Seeking functions will return <tt>OV_ENOSEEK</tt> on
nonseekable files and streams.

</ul>

<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
	<td><b>function</b></td>
	<td><b>purpose</b></td>
</tr>
<tr valign=top>
	<td><a href="ov_raw_seek.html">ov_raw_seek</a></td>
	<td>This function seeks to a position specified in the compressed bitstream, specified in bytes.</td>
</tr>
<tr valign=top>
	<td><a href="ov_pcm_seek.html">ov_pcm_seek</a></td>
	<td>This function seeks to a specific audio sample number, specified in pcm samples.</td>
</tr>
<tr valign=top>
	<td><a href="ov_pcm_seek_page.html">ov_pcm_seek_page</a></td>
	<td>This function seeks to the closest page preceding the specified audio sample number, specified in pcm samples.</td>
</tr>
<tr valign=top>
	<td><a href="ov_time_seek.html">ov_time_seek</a></td>
	<td>This function seeks to the specific time location in the bitstream, specified in seconds </td>
</tr>
<tr valign=top>
	<td><a href="ov_time_seek_page.html">ov_time_seek_page</a></td>
	<td>This function seeks to the closest page preceding the specified time position in the bitstream</td>
</tr>

</tr>
<tr valign=top>
	<td><a href="ov_raw_seek_lap.html">ov_raw_seek_lap</a></td>
	<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>
</tr>
<tr valign=top>
	<td><a href="ov_pcm_seek_lap.html">ov_pcm_seek_lap</a></td>
	<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>
</tr>
<tr valign=top>
	<td><a href="ov_pcm_seek_page_lap.html">ov_pcm_seek_page_lap</a></td>
	<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>
</tr>
<tr valign=top>
	<td><a href="ov_time_seek_lap.html">ov_time_seek_lap</a></td>
	<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>
</tr>
<tr valign=top>
	<td><a href="ov_time_seek_page_lap.html">ov_time_seek_page_lap</a></td>
	<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>
</tr>
</table>

<br><br>
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
</tr><tr>
<td><p class=tiny>Vorbisfile documentation</p></td>
<td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
</tr>
</table>

</body>

</html>