vorbis_encode_init_vbr.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <html>
  2. <head>
  3. <title>libvorbisenc - function - vorbis_encode_init_vbr</title>
  4. <link rel=stylesheet href="style.css" type="text/css">
  5. </head>
  6. <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
  7. <table border=0 width=100%>
  8. <tr>
  9. <td><p class=tiny>libvorbisenc documentation</p></td>
  10. <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
  11. </tr>
  12. </table>
  13. <h1>vorbis_encode_init_vbr</h1>
  14. <p><i>declared in "vorbis/libvorbisenc.h";</i></p>
  15. <p>This is the primary function within libvorbisenc for setting up variable bitrate ("quality" based) modes.
  16. <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.
  17. <p>
  18. <br><br>
  19. <table border=0 color=black cellspacing=0 cellpadding=7>
  20. <tr bgcolor=#cccccc>
  21. <td>
  22. <pre><b>
  23. extern int vorbis_encode_init_vbr(<a href="vorbis_info.html">vorbis_info</a> *vi,
  24. long channels,
  25. long rate,
  26. float base_quality);
  27. </b></pre>
  28. </td>
  29. </tr>
  30. </table>
  31. <h3>Parameters</h3>
  32. <dl>
  33. <dt><i>vi</i></dt>
  34. <dd>File pointer to an initialized <a href="vorbis_info.html">vorbis_info</a> struct.</dd>
  35. <dt><i>channels</i></dt>
  36. <dd>The number of channels to be encoded.</dd>
  37. <dt><i>rate</i></dt>
  38. <dd>The sampling rate of the source audio.</dd>
  39. <dt><i>base_quality</i></dt>
  40. <dd>Desired quality level, currently from -0.1 to 1.0 (lo to hi).</dd>
  41. </dl>
  42. <h3>Return Values</h3>
  43. <blockquote>
  44. <li>
  45. 0 for success</li>
  46. <li>less than zero for failure:</li>
  47. <ul>
  48. <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
  49. <li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li>
  50. <li>OV_EIMPL - Unimplemented mode; unable to comply with quality level request.</li>
  51. </ul>
  52. </blockquote>
  53. <p>
  54. <br><br>
  55. <hr noshade>
  56. <table border=0 width=100%>
  57. <tr valign=top>
  58. <td><p class=tiny>copyright &copy; 2004 xiph.org</p></td>
  59. <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>
  60. </tr><tr>
  61. <td><p class=tiny>libvorbisenc documentation</p></td>
  62. <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
  63. </tr>
  64. </table>
  65. </body>
  66. </html>