ov_pcm_seek_page_lap.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <html>
  2. <head>
  3. <title>Vorbisfile - function - ov_pcm_seek_page_lap</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_lap</h1>
  14. <p><i>declared in "vorbis/vorbisfile.h";</i></p>
  15. <p>Seeks to the closest page preceding the specified location (in pcm
  16. samples) within the physical bitstream. This variant of <a
  17. href="ov_pcm_seek_page.html">ov_pcm_seek_page</a> also automatically
  18. crosslaps the transition from the previous playback position into the
  19. new playback position in order to eliminate clicking and boundary
  20. discontinuities. Otherwise, usage and behavior is identical to <a
  21. href="ov_pcm_seek_page.html">ov_pcm_seek_page</a>.
  22. <p>This function is faster than <a
  23. href="ov_pcm_seek_lap.html">ov_pcm_seek_lap</a> because the function
  24. can begin decoding at a page boundary rather than seeking through any
  25. remaining samples before the specified location. However, it is less
  26. accurate.
  27. <p>ov_pcm_seek_page_lap also updates everything needed within the
  28. decoder, so you can immediately call <a
  29. href="ov_read.html">ov_read()</a> and get data from the newly seeked
  30. to position.
  31. <p>ov_pcm_seek_page_lap will lap between logical stream links of
  32. differing numbers of channels. Any extra channels from the origin of
  33. the seek are ignored; playback of these channels simply ends. Extra
  34. channels at the destination are lapped from silence.
  35. ov_pcm_seek_page_lap will also lap between logical stream links of
  36. differing sample rates. In this case, the sample rates are ignored
  37. (no implicit resampling is done to match playback). It is up to the
  38. application developer to decide if this behavior makes any sense in a
  39. given context; in practical use, these default behaviors perform
  40. sensibly.
  41. <p>This function only works for seekable streams.
  42. <br><br>
  43. <table border=0 color=black cellspacing=0 cellpadding=7>
  44. <tr bgcolor=#cccccc>
  45. <td>
  46. <pre><b>
  47. int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos);
  48. </b></pre>
  49. </td>
  50. </tr>
  51. </table>
  52. <h3>Parameters</h3>
  53. <dl>
  54. <dt><i>vf</i></dt>
  55. <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile
  56. functions.</dd>
  57. <dt><i>pos</i></dt>
  58. <dd>Position in pcm samples to seek to in the bitstream.</dd>
  59. </dl>
  60. <h3>Return Values</h3>
  61. <blockquote>
  62. <ul>
  63. <li>0 for success</li>
  64. <li>
  65. nonzero indicates failure, described by several error codes:
  66. <ul>
  67. <li>OV_ENOSEEK - Bitstream is not seekable.
  68. </li>
  69. <li>OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open.
  70. </li>
  71. <li>OV_EREAD - A read from media returned an error.
  72. </li>
  73. <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack
  74. corruption.
  75. </li>
  76. <li>OV_EOF - Indicates stream is at end of file immediately after a seek
  77. (making crosslap impossible as there's no preceeding decode state to crosslap).
  78. </li>
  79. <li>OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.
  80. </li>
  81. </ul></li>
  82. </ul></blockquote>
  83. <br><br>
  84. <hr noshade>
  85. <table border=0 width=100%>
  86. <tr valign=top>
  87. <td><p class=tiny>copyright &copy; 2007 Xiph.org</p></td>
  88. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
  89. </tr><tr>
  90. <td><p class=tiny>Vorbisfile documentation</p></td>
  91. <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td>
  92. </tr>
  93. </table>
  94. </body>
  95. </html>