blob: 1f61b47f361e0ed4bbe8bd15589b88c341f33333 [file] [log] [blame]
<title>Tremor - Decoding</title>
<link rel=stylesheet href="style.css" type="text/css">
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
<table border=0 width=100%>
<td><p class=tiny>Tremor documentation</p></td>
<td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
All libivorbisdec decoding routines are declared in "ivorbisfile.h".
After <a href="initialization.html">initialization</a>, decoding audio
is as simple as calling <a href="ov_read.html">ov_read()</a>. This
function works similarly to reading from a normal file using
However, a few differences are worth noting:
<h2>multiple stream links</h2>
A Vorbis stream may consist of multiple sections (called links) that
encode differing numbers of channels or sample rates. It is vitally
important to pay attention to the link numbers returned by <a
href="ov_read.html">ov_read</a> and handle audio changes that may
occur at link boundaries. Such multi-section files do exist in the
wild and are not merely a specification curiosity.
<h2>returned data amount</h2>
<a href="ov_read.html">ov_read</a> does not attempt to completely fill
a large, passed in data buffer; it merely guarantees that the passed
back data does not overflow the passed in buffer size. Large buffers
may be filled by iteratively looping over calls to <a
href="ov_read.html">ov_read</a> (incrementing the buffer pointer)
until the original buffer is filled.
<h2>file cursor position</h2>
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 seperate files.
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
<tr valign=top>
<td><a href="ov_read.html">ov_read</a></td>
<td>This function makes up the main chunk of a decode loop. It takes an
OggVorbis_File structure, which must have been initialized by a previous
call to <a href="ov_open.html"><tt>ov_open()</tt></a>.</td>
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright &copy; 2002</p></td>
<td align=right><p class=tiny><a href="">Ogg Vorbis</a></p></td>
<td><p class=tiny>Tremor documentation</p></td>
<td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>