4 <title>Vorbisfile - Decoding</title>
5 <link rel=stylesheet href="style.css" type="text/css">
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
11 <td><p class=tiny>Vorbisfile documentation</p></td>
12 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
19 All libvorbisfile decoding routines are declared in "vorbis/vorbisfile.h".
22 After <a href="initialization.html">initialization</a>, decoding audio
23 is as simple as calling <a href="ov_read.html">ov_read()</a>. This
24 function works similarly to reading from a normal file using
27 However, a few differences are worth noting:
29 <h2>multiple stream links</h2>
31 A Vorbis stream may consist of multiple sections (called links) that
32 encode differing numbers of channels or sample rates. It is vitally
33 important to pay attention to the link numbers returned by <a
34 href="ov_read.html">ov_read</a> and handle audio changes that may
35 occur at link boundaries. Such multi-section files do exist in the
36 wild and are not merely a specification curiosity.
38 <h2>returned data amount</h2>
40 <a href="ov_read.html">ov_read</a> does not attempt to completely fill
41 a large, passed in data buffer; it merely guarantees that the passed
42 back data does not overflow the passed in buffer size. Large buffers
43 may be filled by iteratively looping over calls to <a
44 href="ov_read.html">ov_read</a> (incrementing the buffer pointer)
45 until the original buffer is filled.
47 <h2>file cursor position</h2>
49 Vorbis files do not necessarily start at a sample number or time offset
50 of zero. Do not be surprised if a file begins at a positive offset of
51 several minutes or hours, such as would happen if a large stream (such
52 as a concert recording) is chopped into multiple seperate files.
55 <table border=1 color=black width=50% cellspacing=0 cellpadding=7>
57 <td><b>function</b></td>
58 <td><b>purpose</b></td>
61 <td><a href="ov_read.html">ov_read</a></td>
62 <td>This function makes up the main chunk of a decode loop. It takes an
63 OggVorbis_File structure, which must have been initialized by a previous
64 call to <a href="ov_open.html"><tt>ov_open()</tt></a>.</td>
67 <td><a href="ov_read_float.html">ov_read_float</a></td>
68 <td>This function decodes to floats instead of integer samples.</td>
74 <table border=0 width=100%>
76 <td><p class=tiny>copyright © 2003 Xiph.org</p></td>
77 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
79 <td><p class=tiny>Vorbisfile documentation</p></td>
80 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>