ov_time_seek_lap.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <html>
  2. <head>
  3. <title>Vorbisfile - function - ov_time_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_time_seek_lap</h1>
  14. <p><i>declared in "vorbis/vorbisfile.h";</i></p>
  15. <p>For seekable
  16. streams, ov_time_seek_lap seeks to the given time. This variant of <a
  17. href="ov_time_seek.html">ov_time_seek</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_time_seek.html">ov_time_seek</a>.
  22. <p>ov_time_seek_lap also updates everything needed within the decoder,
  23. so you can immediately call <a href="ov_read.html">ov_read()</a> and
  24. get data from the newly seeked to position.
  25. <p>ov_time_seek_lap will lap between logical stream links of differing
  26. numbers of channels. Any extra channels from the origin of the seek
  27. are ignored; playback of these channels simply ends. Extra channels at
  28. the destination are lapped from silence. ov_time_seek_lap will also
  29. lap between logical stream links of differing sample rates. In this
  30. case, the sample rates are ignored (no implicit resampling is done to
  31. match playback). It is up to the application developer to decide if
  32. this behavior makes any sense in a given context; in practical use,
  33. these default behaviors perform sensibly.
  34. <p> This function does not work for unseekable streams.
  35. <br><br>
  36. <table border=0 color=black cellspacing=0 cellpadding=7>
  37. <tr bgcolor=#cccccc>
  38. <td>
  39. <pre><b>
  40. int ov_time_seek_lap(<a href="OggVorbis_File.html">OggVorbis_File</a> *vf, double s);
  41. </b></pre>
  42. </td>
  43. </tr>
  44. </table>
  45. <h3>Parameters</h3>
  46. <dl>
  47. <dt><i>vf</i></dt>
  48. <dd>Pointer to our already opened and initialized OggVorbis_File structure.</dd>
  49. <dt><i>ms</i></dt>
  50. <dd>Location to seek to within the file, specified in seconds.</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>