examples/sfexamples/oggvorbiscodec/src/tremor/doc/decoding.html

00001 <html>
00002 
00003 <head>
00004 <title>Tremor - Decoding</title>
00005 <link rel=stylesheet href="style.css" type="text/css">
00006 </head>
00007 
00008 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
00009 <table border=0 width=100%>
00010 <tr>
00011 <td><p class=tiny>Tremor documentation</p></td>
00012 <td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
00013 </tr>
00014 </table>
00015 
00016 <h1>Decoding</h1>
00017 
00018 <p>
00019 All libivorbisdec decoding routines are declared in "ivorbisfile.h".
00020 <p>
00021 
00022 After <a href="initialization.html">initialization</a>, decoding audio
00023 is as simple as calling <a href="ov_read.html">ov_read()</a>. This
00024 function works similarly to reading from a normal file using
00025 <tt>read()</tt>.<p>
00026 
00027 However, a few differences are worth noting:
00028 
00029 <h2>multiple stream links</h2>
00030 
00031 A Vorbis stream may consist of multiple sections (called links) that
00032 encode differing numbers of channels or sample rates.  It is vitally
00033 important to pay attention to the link numbers returned by <a
00034 href="ov_read.html">ov_read</a> and handle audio changes that may
00035 occur at link boundaries.  Such multi-section files do exist in the
00036 wild and are not merely a specification curiosity.
00037 
00038 <h2>returned data amount</h2>
00039 
00040 <a href="ov_read.html">ov_read</a> does not attempt to completely fill
00041 a large, passed in data buffer; it merely guarantees that the passed
00042 back data does not overflow the passed in buffer size.  Large buffers
00043 may be filled by iteratively looping over calls to <a
00044 href="ov_read.html">ov_read</a> (incrementing the buffer pointer)
00045 until the original buffer is filled.
00046 
00047 <h2>file cursor position</h2>
00048 
00049 Vorbis files do not necessarily start at a sample number or time offset
00050 of zero.  Do not be surprised if a file begins at a positive offset of
00051 several minutes or hours, such as would happen if a large stream (such
00052 as a concert recording) is chopped into multiple seperate files.
00053 
00054 <p>
00055 <table border=1 color=black width=50% cellspacing=0 cellpadding=7>
00056 <tr bgcolor=#cccccc>
00057         <td><b>function</b></td>
00058         <td><b>purpose</b></td>
00059 </tr>
00060 <tr valign=top>
00061         <td><a href="ov_read.html">ov_read</a></td>
00062         <td>This function makes up the main chunk of a decode loop. It takes an
00063 OggVorbis_File structure, which must have been initialized by a previous
00064 call to <a href="ov_open.html"><tt>ov_open()</tt></a>.</td>
00065 </tr>
00066 </table>
00067 
00068 <br><br>
00069 <hr noshade>
00070 <table border=0 width=100%>
00071 <tr valign=top>
00072 <td><p class=tiny>copyright &copy; 2002 Xiph.org</p></td>
00073 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
00074 </tr><tr>
00075 <td><p class=tiny>Tremor documentation</p></td>
00076 <td align=right><p class=tiny>Tremor version 1.0 - 20020403</p></td>
00077 </tr>
00078 </table>
00079 
00080 </body>
00081 
00082 </html>

Generated by  doxygen 1.6.2