ov_pcm_seek_page.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <html>
  2. <head>
  3. <title>Vorbisfile - function - ov_pcm_seek_page</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_pcm_seek_page</h1>
  14. <p><i>declared in "vorbis/vorbisfile.h";</i></p>
  15. <p>Seeks to the closest page preceding the specified location (in pcm samples) within the physical bitstream. This function only works for seekable streams.
  16. <p>This function is faster than <a href="ov_pcm_seek.html">ov_pcm_seek</a> because the function can begin decoding at a page boundary rather than seeking through any remaining samples before the specified location. However, it is less accurate.
  17. <p>This also updates everything needed within the
  18. decoder, so you can immediately call <a href="ov_read.html">ov_read()</a> and get data from
  19. the newly seeked to position.
  20. <p>
  21. <br><br>
  22. <table border=0 color=black cellspacing=0 cellpadding=7>
  23. <tr bgcolor=#cccccc>
  24. <td>
  25. <pre><b>
  26. int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos);
  27. </b></pre>
  28. </td>
  29. </tr>
  30. </table>
  31. <h3>Parameters</h3>
  32. <dl>
  33. <dt><i>vf</i></dt>
  34. <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile
  35. functions.</dd>
  36. <dt><i>pos</i></dt>
  37. <dd>Position in pcm samples to seek to in the bitstream.</dd>
  38. </dl>
  39. <h3>Return Values</h3>
  40. <blockquote>
  41. <ul>
  42. <li>0 for success</li>
  43. <li>
  44. nonzero indicates failure, described by several error codes:
  45. <ul>
  46. <li>OV_ENOSEEK - Bitstream is not seekable.
  47. </li>
  48. <li>OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open.
  49. </li>
  50. <li>OV_EREAD - A read from media returned an error.
  51. </li>
  52. <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack
  53. corruption.
  54. </li>
  55. <li>OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.
  56. </li>
  57. </ul></li>
  58. </ul></blockquote>
  59. <br><br>
  60. <hr noshade>
  61. <table border=0 width=100%>
  62. <tr valign=top>
  63. <td><p class=tiny>copyright &copy; 2007 Xiph.org</p></td>
  64. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
  65. </tr><tr>
  66. <td><p class=tiny>Vorbisfile documentation</p></td>
  67. <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td>
  68. </tr>
  69. </table>
  70. </body>
  71. </html>