ov_read_float.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 version 1.2.0 - 20070723</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_float(<a href="OggVorbis_File.html">OggVorbis_File</a> *vf, float ***pcm_channels, int samples, 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>samples</i></dt>
  40. <dd>Maximum number of decoded samples to produce.</dd>
  41. <dt><i>bitstream</i></dt>
  42. <dd>A pointer to the number of the current logical bitstream.</dd>
  43. </dl>
  44. <h3>Return Values</h3>
  45. <blockquote>
  46. <dl>
  47. <dt>OV_HOLE</dt>
  48. <dd>indicates there was an interruption in the data.
  49. <br>(one of: garbage between pages, loss of sync followed by
  50. recapture, or a corrupt page)</dd>
  51. <dt>OV_EBADLINK</dt>
  52. <dd>indicates that an invalid stream section was supplied to
  53. libvorbisfile, or the requested link is corrupt.</dd>
  54. <dt>0</dt>
  55. <dd>indicates EOF</dd>
  56. <dt><i>n</i></dt>
  57. <dd>indicates actual number of samples read. <tt>ov_read_float()</tt> will
  58. decode at most one vorbis packet per invocation, so the value
  59. returned will generally be less than <tt>length</tt>.
  60. </dl>
  61. </blockquote>
  62. <h3>Notes</h3>
  63. <p><b>Typical usage:</b>
  64. <blockquote>
  65. <tt>float **pcm;
  66. samples_read = ov_read_float(&amp;vf,pcm, 1024, &amp;current_section)</tt>
  67. </blockquote>
  68. This decodes up to 1024 float samples.
  69. </p>
  70. <br>
  71. <br><br>
  72. <hr noshade>
  73. <table border=0 width=100%>
  74. <tr valign=top>
  75. <td><p class=tiny>copyright &copy; 2002 vorbis team</p></td>
  76. <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>
  77. </tr><tr>
  78. <td><p class=tiny>Vorbisfile documentation</p></td>
  79. <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td>
  80. </tr>
  81. </table>
  82. </body>
  83. </html>