annotate src/libvorbis-1.3.3/doc/vorbisfile/initialization.html @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 05aa0afa9217
children
rev   line source
Chris@1 1 <html>
Chris@1 2
Chris@1 3 <head>
Chris@1 4 <title>Vorbisfile - Setup/Teardown</title>
Chris@1 5 <link rel=stylesheet href="style.css" type="text/css">
Chris@1 6 </head>
Chris@1 7
Chris@1 8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
Chris@1 9 <table border=0 width=100%>
Chris@1 10 <tr>
Chris@1 11 <td><p class=tiny>Vorbisfile documentation</p></td>
Chris@1 12 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
Chris@1 13 </tr>
Chris@1 14 </table>
Chris@1 15
Chris@1 16 <H1>Setup/Teardown</h1> <p>In order to decode audio using
Chris@1 17 libvorbisfile, a bitstream containing Vorbis audio must be properly
Chris@1 18 initialized before decoding and cleared when decoding is finished.
Chris@1 19 The simplest possible case is to use <a
Chris@1 20 href="ov_fopen.html">ov_fopen()</a> to open the file for access, check
Chris@1 21 it for Vorbis content, and prepare it for playback. A successful <a
Chris@1 22 href="../libvorbis/return.html">return code</a> from <a
Chris@1 23 href="ov_fopen.html">ov_fopen()</a> indicates the file is ready for use.
Chris@1 24 Once the file is no longer needed, <a
Chris@1 25 href="ov_clear.html">ov_clear()</a> is used to close the file and
Chris@1 26 deallocate decoding resources.<p>
Chris@1 27
Chris@1 28 On systems other than Windows<a href="ov_open.html#winfoot">[a]</a>, an
Chris@1 29 application may also open a file itself using <tt>fopen()</tt>, then pass the
Chris@1 30 <tt>FILE *</tt> to libvorbisfile using <a
Chris@1 31 href="ov_open.html">ov_open()</a>. </b>Do not</b> call
Chris@1 32 <tt>fclose()</tt> on a file handle successfully submitted to <a
Chris@1 33 href="ov_open.html">ov_open()</a>; libvorbisfile does this in the <a
Chris@1 34 href="ov_clear.html">ov_clear()</a> call.<p>
Chris@1 35
Chris@1 36 An application that requires more setup flexibility may open a data
Chris@1 37 stream using <a href="ov_open_callbacks.html">ov_open_callbacks()</a>
Chris@1 38 to change default libvorbis behavior or specify non-stdio data access
Chris@1 39 mechanisms.<p>
Chris@1 40
Chris@1 41 <p>
Chris@1 42 All libvorbisfile initialization and deallocation routines are declared in "vorbis/vorbisfile.h".
Chris@1 43 <p>
Chris@1 44
Chris@1 45 <table border=1 color=black width=50% cellspacing=0 cellpadding=7>
Chris@1 46 <tr bgcolor=#cccccc>
Chris@1 47 <td><b>function</b></td>
Chris@1 48 <td><b>purpose</b></td>
Chris@1 49 </tr>
Chris@1 50 <tr valign=top>
Chris@1 51 <td><a href="ov_fopen.html">ov_fopen</a></td>
Chris@1 52 <td>Opens a file and initializes the Ogg Vorbis bitstream with default values. This must be called before other functions in the library may be
Chris@1 53 used.</td>
Chris@1 54 </tr>
Chris@1 55 <tr valign=top>
Chris@1 56 <td><a href="ov_open.html">ov_open</a></td>
Chris@1 57 <td>Initializes the Ogg Vorbis bitstream with default values from a passed in file handle. This must be called before other functions in the library may be
Chris@1 58 used. <a href="#winfoot"><em>Do not use this call under Windows [a];</em></a> Use <a href="ov_fopen.html">ov_fopen()</a> or <a href="ov_open_callbacks.html">ov_open_callbacks()</a> instead.</td>
Chris@1 59 </tr>
Chris@1 60 <tr valign=top>
Chris@1 61 <td><a href="ov_open_callbacks.html">ov_open_callbacks</a></td>
Chris@1 62 <td>Initializes the Ogg Vorbis bitstream from a file handle and custom file/bitstream manipulation routines. Used instead of <a href="ov_open.html">ov_open()</a> or <a href="ov_fopen.html">ov_fopen()</a> when altering or replacing libvorbis's default stdio I/O behavior, or when a bitstream must be initialized from a <tt>FILE *</tt> under Windows.</td>
Chris@1 63 </tr>
Chris@1 64
Chris@1 65 <tr valign=top>
Chris@1 66 <td><a href="ov_test.html">ov_test</a></td>
Chris@1 67
Chris@1 68 <td>Partially opens a file just far enough to determine if the file
Chris@1 69 is an Ogg Vorbis file or not. A successful return indicates that the
Chris@1 70 file appears to be an Ogg Vorbis file, but the <a
Chris@1 71 href="OggVorbis_File.html">OggVorbis_File</a> struct is not yet fully
Chris@1 72 initialized for actual decoding. After a <a href="../libvorbis/return.html">successful return</a>, the file
Chris@1 73 may be closed using <a href="ov_clear.html">ov_clear()</a> or fully
Chris@1 74 opened for decoding using <a
Chris@1 75 href="ov_test_open.html">ov_test_open()</a>.<p> This call is intended to
Chris@1 76 be used as a less expensive file open test than a full <a
Chris@1 77 href="ov_open.html">ov_open()</a>.<p>
Chris@1 78 Note that libvorbisfile owns the passed in file resource is it returns success; do not <tt>fclose()</tt> files owned by libvorbisfile.</td>
Chris@1 79
Chris@1 80 </tr>
Chris@1 81 <tr valign=top>
Chris@1 82 <td><a href="ov_test_callbacks.html">ov_test_callbacks</a></td>
Chris@1 83 <td>As above but allowing application-define I/O callbacks.<p>
Chris@1 84 Note that libvorbisfile owns the passed in file resource is it returns success; do not <tt>fclose()</tt> files owned by libvorbisfile.</td>
Chris@1 85
Chris@1 86 </tr>
Chris@1 87 <tr valign=top>
Chris@1 88 <td><a href="ov_test_open.html">ov_test_open</a><td>
Chris@1 89 Finish opening a file after a successful call to <a href="ov_test.html">ov_test()</a> or <a href="ov_test_callbacks.html">ov_test_callbacks()</a>.</td>
Chris@1 90 </tr>
Chris@1 91 <tr valign=top>
Chris@1 92 <td><a href="ov_clear.html">ov_clear</a></td> <td>Closes the
Chris@1 93 bitstream and cleans up loose ends. Must be called when
Chris@1 94 finished with the bitstream. After return, the <a
Chris@1 95 href="OggVorbis_File.html">OggVorbis_File</a> struct is
Chris@1 96 invalid and may not be used before being initialized again
Chris@1 97 before begin reinitialized.
Chris@1 98
Chris@1 99 </td>
Chris@1 100 </tr>
Chris@1 101 </table>
Chris@1 102
Chris@1 103 <br><br>
Chris@1 104 <hr noshade>
Chris@1 105
Chris@1 106 <table border=0 width=100%>
Chris@1 107 <tr valign=top>
Chris@1 108 <td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
Chris@1 109 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
Chris@1 110 </tr><tr>
Chris@1 111 <td><p class=tiny>Vorbisfile documentation</p></td>
Chris@1 112 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
Chris@1 113 </tr>
Chris@1 114 </table>
Chris@1 115
Chris@1 116 </body>
Chris@1 117
Chris@1 118 </html>