ov_read_float.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <html>
  2. <head>
  3. <title>vorbisfile - function - ov_read_float</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>vorbisfile documentation</p></td>
  10. <td align=right><p class=tiny>vorbisfile - 20011218</p></td>
  11. </tr>
  12. </table>
  13. <h1>ov_read_float()</h1>
  14. <p><i>declared in "vorbis/vorbisfile.h";</i></p>
  15. <p>
  16. This is the function used to decode a Vorbis file within a loop, but
  17. returns samples in native float format instead of in integer formats.
  18. </p><p>
  19. For more information on how ov_read_float() deals with the complex issues
  20. of chaining, etc, refer to the documentation for <a href="ov_read.html">ov_read()</a>.
  21. </p>
  22. <br><br>
  23. <table border=0 color=black cellspacing=0 cellpadding=7>
  24. <tr bgcolor=#cccccc>
  25. <td>
  26. <pre><b>
  27. long ov_read(<a href="OggVorbis_File.html">OggVorbis_File</a> *vf, float ***pcm_channels, int *bitstream);
  28. </b></pre>
  29. </td>
  30. </tr>
  31. </table>
  32. <h3>Parameters</h3>
  33. <dl>
  34. <dt><i>vf</i></dt>
  35. <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile
  36. functions.</dd>
  37. <dt><i>pcm_channels</i></dt>
  38. <dd>A pointer to an output buffer. The pointer will be set to the decoded output buffer.</dd>
  39. <dt><i>bitstream</i></dt>
  40. <dd>A pointer to the number of the current logical bitstream.</dd>
  41. </dl>
  42. <h3>Return Values</h3>
  43. <blockquote>
  44. <dl>
  45. <dt>OV_HOLE</dt>
  46. <dd>indicates there was an interruption in the data.
  47. <br>(one of: garbage between pages, loss of sync followed by
  48. recapture, or a corrupt page)</dd>
  49. <dt>OV_EBADLINK</dt>
  50. <dd>indicates that an invalid stream section was supplied to
  51. libvorbisfile, or the requested link is corrupt.</dd>
  52. <dt>0</dt>
  53. <dd>indicates EOF</dd>
  54. <dt><i>n</i></dt>
  55. <dd>indicates actual number of bytes read. <tt>ov_read()</tt> will
  56. decode at most one vorbis packet per invocation, so the value
  57. returned will generally be less than <tt>length</tt>.
  58. </dl>
  59. </blockquote>
  60. <h3>Notes</h3>
  61. <p><b>Typical usage:</b>
  62. <blockquote>
  63. <tt>float **pcm;
  64. bytes_read = ov_read_float(&amp;vf,pcm,&amp;current_section)</tt>
  65. </blockquote>
  66. This decodes one packets worth of float samples.
  67. </p>
  68. <br>
  69. <br><br>
  70. <hr noshade>
  71. <table border=0 width=100%>
  72. <tr valign=top>
  73. <td><p class=tiny>copyright &copy; 2001 vorbis team</p></td>
  74. <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>
  75. </tr><tr>
  76. <td><p class=tiny>vorbisfile documentation</p></td>
  77. <td align=right><p class=tiny>vorbisfile - 20011218</p></td>
  78. </tr>
  79. </table>
  80. </body>
  81. </html>