ov_crosslap.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <html>
  2. <head>
  3. <title>Vorbisfile - function - ov_crosslap</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_crosslap()</h1>
  14. <p><i>declared in "vorbis/vorbisfile.h";</i></p>
  15. <p>ov_crosslap overlaps and blends the boundary at a transition
  16. between two separate streams represented by separate <a
  17. href="OggVorbis_File.html">OggVorbis_File</a> structures. For lapping
  18. transitions due to seeking within a single stream represented by a
  19. single <a href="OggVorbis_File.html">OggVorbis_File</a> structure,
  20. consider using the lapping versions of the <a
  21. href="seeking.html">vorbisfile seeking functions</a> instead.
  22. <p>ov_crosslap is used between the last (usually ov_read) call on
  23. the old stream and the first ov_read from the new stream. Any
  24. desired positioning of the new stream must occur before the call to
  25. ov_crosslap() as a seek dumps all prior lapping information from a
  26. stream's decode state. Crosslapping does not introduce or remove any
  27. extraneous samples; positioning works exactly as if ov_crosslap was not
  28. called.
  29. <p>ov_crosslap will lap between streams of differing numbers of
  30. channels. Any extra channels from the old stream are ignored; playback
  31. of these channels simply ends. Extra channels in the new stream are
  32. lapped from silence. ov_crosslap will also lap between streams links
  33. of differing sample rates. In this case, the sample rates are ignored
  34. (no implicit resampling is done to match playback). It is up to the
  35. application developer to decide if this behavior makes any sense in a
  36. given context; in practical use, these default behaviors perform
  37. sensibly.
  38. <br><br>
  39. <table border=0 color=black cellspacing=0 cellpadding=7>
  40. <tr bgcolor=#cccccc>
  41. <td>
  42. <pre><b>
  43. long ov_crosslap(<a href="OggVorbis_File.html">OggVorbis_File</a> *old, <a href="OggVorbis_File.html">OggVorbis_File</a> *new);
  44. </b></pre>
  45. </td>
  46. </tr>
  47. </table>
  48. <h3>Parameters</h3>
  49. <dl>
  50. <dt><i>old</i></dt>
  51. <dd>A pointer to the OggVorbis_File structure representing the origin stream from which to transition playback.</dd>
  52. <dt><i>new</i></dt>
  53. <dd>A pointer to the OggVorbis_File structure representing the stream with which playback continues.</dd>
  54. </dl>
  55. <h3>Return Values</h3>
  56. <blockquote>
  57. <dl>
  58. <dt>OV_EINVAL</dt>
  59. <dd>crosslap called with an OggVorbis_File structure that isn't open.</dd>
  60. <dt>OV_EFAULT</dt>
  61. <dd>internal error; implies a library bug or external heap corruption.</dd>
  62. <dt>OV_EREAD</dt>
  63. <dd> A read from media returned an error.</dd>
  64. <dt>OV_EOF</dt>
  65. <dd>indicates stream <tt>vf2</tt> is at end of file, or that <tt>vf1</tt> is at end of file immediately after a seek (making crosslap impossible as there's no preceding decode state to crosslap).</dd>
  66. <dt><i>0</i></dt>
  67. <dd>success.</dd>
  68. </dl>
  69. </blockquote>
  70. <br><br>
  71. <hr noshade>
  72. <table border=0 width=100%>
  73. <tr valign=top>
  74. <td><p class=tiny>copyright &copy; 2007 Xiph.org</p></td>
  75. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
  76. </tr><tr>
  77. <td><p class=tiny>Vorbisfile documentation</p></td>
  78. <td align=right><p class=tiny>vorbisfile version 1.2.0 - 20070723</p></td>
  79. </tr>
  80. </table>
  81. </body>
  82. </html>