vorbis_encode_setup_vbr.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <html>
  2. <head>
  3. <title>libvorbisenc - function - vorbis_encode_setup_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_setup_vbr</h1>
  14. <p><i>declared in "vorbis/libvorbisenc.h";</i></p>
  15. <p>This function performs step-one of a three-step variable bitrate
  16. (quality-based) encode setup. It functions similarly to the one-step
  17. setup performed by <a
  18. href="vorbis_encode_init_vbr.html">vorbis_encode_init_vbr()</a> but
  19. allows an application to make further encode setup tweaks using <a
  20. href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> before finally
  21. calling <a
  22. href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a> to
  23. complete the setup process.
  24. <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.
  25. <p>
  26. <br><br>
  27. <table border=0 color=black cellspacing=0 cellpadding=7>
  28. <tr bgcolor=#cccccc>
  29. <td>
  30. <pre><b>
  31. extern int vorbis_encode_init_vbr(<a href="vorbis_info.html">vorbis_info</a> *vi,
  32. long channels,
  33. long rate,
  34. float base_quality);
  35. </b></pre>
  36. </td>
  37. </tr>
  38. </table>
  39. <h3>Parameters</h3>
  40. <dl>
  41. <dt><i>vi</i></dt>
  42. <dd>File 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. <h3>Return Values</h3>
  51. <blockquote>
  52. <li>
  53. 0 for success</li>
  54. <li>less than zero for failure:</li>
  55. <ul>
  56. <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
  57. <li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li>
  58. <li>OV_EIMPL - Unimplemented mode; unable to comply with quality level request.</li>
  59. </ul>
  60. </blockquote>
  61. <p>
  62. <br><br>
  63. <hr noshade>
  64. <table border=0 width=100%>
  65. <tr valign=top>
  66. <td><p class=tiny>copyright &copy; 2004 xiph.org</p></td>
  67. <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>
  68. </tr><tr>
  69. <td><p class=tiny>libvorbisenc documentation</p></td>
  70. <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
  71. </tr>
  72. </table>
  73. </body>
  74. </html>