ov_pcm_seek_lap.html 3.2 KB

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