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 release 1.1 - 20040709</p></td> 13</tr> 14</table> 15 16<h1>vorbis_encode_init_vbr</h1> 17 18<p><i>declared in "vorbis/vorbisenc.h";</i></p> 19 20<p>This is the primary function within libvorbisenc for setting up variable bitrate ("quality" based) modes. 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> 23<br><br> 24<table border=0 color=black cellspacing=0 cellpadding=7> 25<tr bgcolor=#cccccc> 26 <td> 27<pre><b> 28extern int vorbis_encode_init_vbr(<a href="vorbis_info.html">vorbis_info</a> *vi, 29 long channels, 30 long rate, 31 32 float base_quality); 33 34</b></pre> 35 </td> 36</tr> 37</table> 38 39<h3>Parameters</h3> 40<dl> 41<dt><i>vi</i></dt> 42<dd>Pointer to an initialized <a href="vorbis_info.html">vorbis_info</a> struct.</dd> 43<dt><i>channels</i></dt> 44<dd>The number of channels to be encoded.</dd> 45<dt><i>rate</i></dt> 46<dd>The sampling rate of the source audio.</dd> 47<dt><i>base_quality</i></dt> 48<dd>Desired quality level, currently from -0.1 to 1.0 (lo to hi).</dd> 49</dl> 50 51 52<h3>Return Values</h3> 53<blockquote> 54<li> 550 for success</li> 56 57<li>less than zero for failure:</li> 58<ul> 59<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li> 60<li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li> 61<li>OV_EIMPL - Unimplemented mode; unable to comply with quality level request.</li> 62</ul> 63</blockquote> 64<p> 65 66<br><br> 67<hr noshade> 68<table border=0 width=100%> 69<tr valign=top> 70<td><p class=tiny>copyright © 2004 xiph.org</p></td> 71<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> 72</tr><tr> 73<td><p class=tiny>libvorbisenc documentation</p></td> 74<td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td> 75</tr> 76</table> 77 78 79</body> 80 81</html> 82