ov_time_seek_page_lap.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <html>
  2. <head>
  3. <title>Vorbisfile - function - ov_time_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_time_seek_page_lap</h1>
  14. <p><i>declared in "vorbis/vorbisfile.h";</i></p>
  15. <p>For seekable streams, ov_time_seek_page_lap seeks to the closest
  16. full page preceeding the given time. This variant of <a
  17. href="ov_time_seek_page.html">ov_time_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_time_seek_page.html">ov_time_seek_page</a>.
  22. <p>ov_time_seek_page_lap is faster than <a
  23. href="ov_time_seek_lap.html">ov_time_seek_lap</a> because it doesn't
  24. seek through the last few samples to reach an exact time, but it is
  25. also less accurate. This should be used when speed is important, but
  26. crosslapping is still desired.
  27. <p>ov_time_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_time_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_time_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 does not work for unseekable 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_time_seek_page_lap(<a href="OggVorbis_File.html">OggVorbis_File</a> *vf, double s);
  48. </b></pre>
  49. </td>
  50. </tr>
  51. </table>
  52. <h3>Parameters</h3>
  53. <dl>
  54. <dt><i>vf</i></dt>
  55. <dd>Pointer to our already opened and initialized OggVorbis_File structure.</dd>
  56. <dt><i>ms</i></dt>
  57. <dd>Location to seek to within the file, specified in seconds.</dd>
  58. </dl>
  59. <h3>Return Values</h3>
  60. <blockquote>
  61. <ul>
  62. <li>0 for success</li>
  63. <li>
  64. nonzero indicates failure, described by several error codes:
  65. <ul>
  66. <li>OV_ENOSEEK - Bitstream is not seekable.
  67. </li>
  68. <li>OV_EINVAL - Invalid argument value; possibly called with an OggVorbis_File structure that isn't open.
  69. </li>
  70. <li>OV_EREAD - A read from media returned an error.
  71. </li>
  72. <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack
  73. corruption.
  74. </li>
  75. <li>OV_EOF - Indicates stream is at end of file immediately after a seek
  76. (making crosslap impossible as there's no preceeding decode state to crosslap).
  77. </li>
  78. <li>OV_EBADLINK - Invalid stream section supplied to libvorbisfile, or the requested link is corrupt.
  79. </li>
  80. </ul></li>
  81. </ul></blockquote>
  82. <br><br>
  83. <hr noshade>
  84. <table border=0 width=100%>
  85. <tr valign=top>
  86. <td><p class=tiny>copyright &copy; 2007 Xiph.org</p></td>
  87. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
  88. </tr><tr>
  89. <td><p class=tiny>Vorbisfile documentation</p></td>
  90. <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td>
  91. </tr>
  92. </table>
  93. </body>
  94. </html>