4 <title>libvorbisenc - function - vorbis_encode_setup_managed</title>
5 <link rel=stylesheet href="style.css" type="text/css">
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
11 <td><p class=tiny>libvorbisenc documentation</p></td>
12 <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
16 <h1>vorbis_encode_setup_managed</h1>
18 <p><i>declared in "vorbis/vorbisenc.h";</i></p>
20 <p>This function performs step-one of a three-step bitrate-managed
21 encode setup. It functions similarly to the one-step setup performed
22 by <a href="vorbis_encode_init.html">vorbis_encode_init()</a> but
23 allows an application to make further encode setup tweaks using <a
24 href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> before finally
26 href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a> to
27 complete the setup process.
29 <p>Before this function is called, the <a
30 href="vorbis_info.html">vorbis_info</a> struct should be initialized
31 by using vorbis_info_init() from the libvorbis API. After encoding,
32 vorbis_info_clear should be called.
34 <p>The max_bitrate, nominal_bitrate, and min_bitrate settings are used
35 to set constraints for the encoded file. This function uses these
36 settings to select the appropriate encoding mode and set it up.
39 <table border=0 color=black cellspacing=0 cellpadding=7>
43 extern int vorbis_encode_init(<a href="vorbis_info.html">vorbis_info</a> *vi,
59 <dd>Pointer to an initialized <a href="vorbis_info.html">vorbis_info</a> struct.</dd>
60 <dt><i>channels</i></dt>
61 <dd>The number of channels to be encoded.</dd>
63 <dd>The sampling rate of the source audio.</dd>
64 <dt><i>max_bitrate</i></dt>
65 <dd>Desired maximum bitrate (limit). -1 indicates unset.</dd>
66 <dt><i>nominal_bitrate</i></dt>
67 <dd>Desired average, or central, bitrate. -1 indicates unset.</dd>
68 <dt><i>min_bitrate</i></dt>
69 <dd>Desired minimum bitrate. -1 indicates unset.</dd>
73 <h3>Return Values</h3>
78 <li>less than zero for failure:</li>
80 <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
81 <li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li>
82 <li>OV_EIMPL - Unimplemented mode; unable to comply with bitrate request.</li>
89 <table border=0 width=100%>
91 <td><p class=tiny>copyright © 2004 xiph.org</p></td>
92 <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>
94 <td><p class=tiny>libvorbisenc documentation</p></td>
95 <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>