examples/sfexamples/oggvorbiscodec/src/libvorbis/doc/vorbisfile/ov_crosslap.html

00001 <html>
00002 
00003 <head>
00004 <title>Vorbisfile - function - ov_crosslap</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>Vorbisfile documentation</p></td>
00012 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
00013 </tr>
00014 </table>
00015 
00016 <h1>ov_crosslap()</h1>
00017 
00018 <p><i>declared in "vorbis/vorbisfile.h";</i></p>
00019 
00020 <p>ov_crosslap overlaps and blends the boundary at a transition
00021 between two separate streams represented by separate <a
00022 href="OggVorbis_File.html">OggVorbis_File</a> structures.  For lapping
00023 transitions due to seeking within a single stream represented by a
00024 single <a href="OggVorbis_File.html">OggVorbis_File</a> structure,
00025 consider using the lapping versions of the <a
00026 href="seeking.html">vorbisfile seeking functions</a> instead.
00027 
00028 <p>ov_crosslap is used between the last (usually ov_read) call on
00029 the old stream and the first ov_read from the new stream.  Any
00030 desired positioning of the new stream must occur before the call to
00031 ov_crosslap() as a seek dumps all prior lapping information from a
00032 stream's decode state.  Crosslapping does not introduce or remove any
00033 extraneous samples; positioning works exactly as if ov_crosslap was not
00034 called.
00035 
00036 <p>ov_crosslap will lap between streams of differing numbers of
00037 channels. Any extra channels from the old stream are ignored; playback
00038 of these channels simply ends. Extra channels in the new stream are
00039 lapped from silence.  ov_crosslap will also lap between streams links
00040 of differing sample rates.  In this case, the sample rates are ignored
00041 (no implicit resampling is done to match playback). It is up to the
00042 application developer to decide if this behavior makes any sense in a
00043 given context; in practical use, these default behaviors perform
00044 sensibly.
00045 
00046 <br><br>
00047 <table border=0 color=black cellspacing=0 cellpadding=7>
00048 <tr bgcolor=#cccccc>
00049         <td>
00050 <pre><b>
00051 long ov_crosslap(<a href="OggVorbis_File.html">OggVorbis_File</a> *old, <a href="OggVorbis_File.html">OggVorbis_File</a> *new);
00052 
00053 </b></pre>
00054         </td>
00055 </tr>
00056 </table>
00057 
00058 <h3>Parameters</h3>
00059 <dl>
00060 <dt><i>old</i></dt>
00061 <dd>A pointer to the OggVorbis_File structure representing the origin stream from which to transition playback.</dd>
00062 
00063 <dt><i>new</i></dt>
00064 <dd>A pointer to the OggVorbis_File structure representing the stream with which playback continues.</dd>
00065 </dl>
00066 
00067 
00068 <h3>Return Values</h3>
00069 <blockquote>
00070 <dl>
00071 <dt>OV_EINVAL</dt>
00072   <dd>crosslap called with an OggVorbis_File structure that isn't open.</dd>
00073 <dt>OV_EFAULT</dt>
00074   <dd>internal error; implies a library bug or external heap corruption.</dd>
00075 <dt>OV_EREAD</dt>
00076   <dd> A read from media returned an error.</dd>
00077 <dt>OV_EOF</dt>
00078   <dd>indicates stream <tt>vf2</tt> is at end of file, or that <tt>vf1</tt> is at end of file immediately after a seek (making crosslap impossible as there's no preceding decode state to crosslap).</dd>
00079 <dt><i>0</i></dt>
00080   <dd>success.</dd>
00081 </dl>
00082 </blockquote>
00083 
00084 
00085 
00086 <br><br>
00087 <hr noshade>
00088 <table border=0 width=100%>
00089 <tr valign=top>
00090 <td><p class=tiny>copyright &copy; 2003 Xiph.org</p></td>
00091 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
00092 </tr><tr>
00093 <td><p class=tiny>Vorbisfile documentation</p></td>
00094 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
00095 </tr>
00096 </table>
00097 
00098 </body>
00099 
00100 </html>

Generated by  doxygen 1.6.2