]> git.jsancho.org Git - lugaru.git/blob - libvorbis-1.0.1/doc/vorbisenc/vorbis_encode_init_vbr.html
First shot at an OpenAL renderer. Sound effects work, no music.
[lugaru.git] / libvorbis-1.0.1 / doc / vorbisenc / vorbis_encode_init_vbr.html
1 <html>
2
3 <head>
4 <title>libvorbisenc - function - vorbis_encode_init_vbr</title>
5 <link rel=stylesheet href="style.css" type="text/css">
6 </head>
7
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
10 <tr>
11 <td><p class=tiny>libvorbisenc documentation</p></td>
12 <td align=right><p class=tiny>libvorbisenc - 20011218</p></td>
13 </tr>
14 </table>
15
16 <h1>vorbis_encode_init_vbr</h1>
17
18 <p><i>declared in "vorbis/libvorbisenc.h";</i></p>
19
20 <p>This is the primary function within libvorbisenc.  This is used to properly set up an encoding environment using libvorbisenc.
21 <p>Before this function is called, the <a href="vorbis_info.html">vorbis_info</a> struct should be initialized by using vorbis_info_init() from the libvorbis API.  After encoding, vorbis_info_clear should be called.
22 <p>The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set constraints for the encoded file.  This function uses these settings to select the appropriate encoding mode and set it up.
23 <p>
24 <br><br>
25 <table border=0 color=black cellspacing=0 cellpadding=7>
26 <tr bgcolor=#cccccc>
27         <td>
28 <pre><b>
29 extern int vorbis_encode_init_vbr(<a href="vorbis_info.html">vorbis_info</a> *vi,
30                               long channels,
31                               long rate,
32                               
33                               float base_quality /* from 0. (lo) to 1. (hi) */);
34
35 </b></pre>
36         </td>
37 </tr>
38 </table>
39
40 <h3>Parameters</h3>
41 <dl>
42 <dt><i>vi</i></dt>
43 <dd>File pointer to an initialized <a href="vorbis_info.html">vorbis_info</a> struct.</dd>
44 <dt><i>channels</i></dt>
45 <dd>The number of channels to be encoded.</dd>
46 <dt><i>rate</i></dt>
47 <dd>The sampling rate of the source audio.</dd>
48 <dt><i>base_quality</i></dt>
49 <dd>Desired quality level from 0.0 to 1.0 (lo to hi).</dd>
50 </dl>
51
52
53 <h3>Return Values</h3>
54 <blockquote>
55 <li>
56 0 for success</li>
57
58 <li>less than zero for failure:</li>
59 <ul>
60 <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
61 </ul>
62 </blockquote>
63 <p>
64
65 <br><br>
66 <hr noshade>
67 <table border=0 width=100%>
68 <tr valign=top>
69 <td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
70 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@vorbis.org">team@vorbis.org</a></p></td>
71 </tr><tr>
72 <td><p class=tiny>libvorbisenc documentation</p></td>
73 <td align=right><p class=tiny>libvorbisenc version 1.1.2.2 - 20001106</p></td>
74 </tr>
75 </table>
76
77
78 </body>
79
80 </html>