]> git.jsancho.org Git - lugaru.git/blob - libvorbis-1.0.1/doc/vorbisfile/ov_test_callbacks.html
First shot at an OpenAL renderer. Sound effects work, no music.
[lugaru.git] / libvorbis-1.0.1 / doc / vorbisfile / ov_test_callbacks.html
1 <html>
2
3 <head>
4 <title>Vorbisfile - function - ov_test_callbacks</title>
5 <link rel=stylesheet href="style.css" type="text/css">
6 </head>
7
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
10 <tr>
11 <td><p class=tiny>Vorbisfile documentation</p></td>
12 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
13 </tr>
14 </table>
15
16 <h1>ov_test_callbacks</h1>
17
18 <p><i>declared in "vorbis/vorbisfile.h";</i></p>
19
20 <p>This is an alternative function used to open and test an OggVorbis_File
21 structure when using a data source other than a file.   It allows you to specify custom file manipulation routines and sets up all the related decoding structures.
22 <p>Once this has been called, the same <tt>OggVorbis_File</tt>
23 struct should be passed to all the libvorbisfile functions.
24 <p>
25 <br><br>
26 <table border=0 color=black cellspacing=0 cellpadding=7>
27 <tr bgcolor=#cccccc>
28         <td>
29 <pre><b>
30 int ov_test_callbacks(void *datasource, <a href="OggVorbis_File.html">OggVorbis_File</a> *vf, char *initial, long ibytes, <a href="ov_callbacks.html">ov_callbacks</a> callbacks);
31 </b></pre>
32         </td>
33 </tr>
34 </table>
35
36 <h3>Parameters</h3>
37 <dl>
38 <dt><i>f</i></dt>
39 <dd>File pointer to an already opened file
40 or pipe (it need not be seekable--though this obviously restricts what
41 can be done with the bitstream).</dd>
42 <dt><i>vf</i></dt>
43 <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible libvorbisfile
44 functions. Once this has been called, the same <tt>OggVorbis_File</tt>
45 struct should be passed to all the libvorbisfile functions.</dd>
46 <dt><i>initial</i></dt>
47 <dd>Typically set to NULL.  This parameter is useful if some data has already been
48 read from the file and the stream is not seekable. It is used in conjunction with <tt>ibytes</tt>.  In this case, <tt>initial</tt>
49 should be a pointer to a buffer containing the data read.</dd>
50 <dt><i>ibytes</i></dt>
51 <dd>Typically set to 0.  This parameter is useful if some data has already been
52 read from the file and the stream is not seekable. In this case, <tt>ibytes</tt>
53 should contain the length (in bytes) of the buffer.  Used together with <tt>initial</tt>.</dd>
54 <dt><i>callbacks</i></dt>
55 <dd>Pointer to a completed <a href="ov_callbacks.html">ov_callbacks</a> struct which indicates desired custom file manipulation routines.</dd>
56 </dl>
57
58
59 <h3>Return Values</h3>
60 <blockquote>
61 <li>0 for success</li>
62 <li>less than zero for failure:</li>
63 <ul>
64 <li>OV_EREAD - A read from media returned an error.</li>
65 <li>OV_ENOTVORBIS - Bitstream is not Vorbis data.</li>
66 <li>OV_EVERSION - Vorbis version mismatch.</li>
67 <li>OV_EBADHEADER - Invalid Vorbis bitstream header.</li>
68 <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
69 </ul>
70 </blockquote>
71 <p>
72
73
74
75
76 <br><br>
77 <hr noshade>
78 <table border=0 width=100%>
79 <tr valign=top>
80 <td><p class=tiny>copyright &copy; 2003 Xiph.org</p></td>
81 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
82 </tr><tr>
83 <td><p class=tiny>Vorbisfile documentation</p></td>
84 <td align=right><p class=tiny>vorbisfile version 1.68 - 20030307</p></td>
85 </tr>
86 </table>
87
88 </body>
89
90 </html>