Chris@1
|
1 <html>
|
Chris@1
|
2
|
Chris@1
|
3 <head>
|
Chris@1
|
4 <title>Vorbisfile - function - ov_read_float</title>
|
Chris@1
|
5 <link rel=stylesheet href="style.css" type="text/css">
|
Chris@1
|
6 </head>
|
Chris@1
|
7
|
Chris@1
|
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
Chris@1
|
9 <table border=0 width=100%>
|
Chris@1
|
10 <tr>
|
Chris@1
|
11 <td><p class=tiny>Vorbisfile documentation</p></td>
|
Chris@1
|
12 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
|
Chris@1
|
13 </tr>
|
Chris@1
|
14 </table>
|
Chris@1
|
15
|
Chris@1
|
16 <h1>ov_read_float()</h1>
|
Chris@1
|
17
|
Chris@1
|
18 <p><i>declared in "vorbis/vorbisfile.h";</i></p>
|
Chris@1
|
19
|
Chris@1
|
20 <p>
|
Chris@1
|
21 This is the function used to decode a Vorbis file within a loop, but
|
Chris@1
|
22 returns samples in native float format instead of in integer formats.
|
Chris@1
|
23 </p><p>
|
Chris@1
|
24 For information on channel ordering and how ov_read_float() deals with the complex issues
|
Chris@1
|
25 of chaining, etc, refer to the documentation for <a href="ov_read.html">ov_read()</a>.
|
Chris@1
|
26 </p>
|
Chris@1
|
27
|
Chris@1
|
28 <br><br>
|
Chris@1
|
29 <table border=0 color=black cellspacing=0 cellpadding=7>
|
Chris@1
|
30 <tr bgcolor=#cccccc>
|
Chris@1
|
31 <td>
|
Chris@1
|
32 <pre><b>
|
Chris@1
|
33 long ov_read_float(<a href="OggVorbis_File.html">OggVorbis_File</a> *vf, float ***pcm_channels, int samples, int *bitstream);
|
Chris@1
|
34 </b></pre>
|
Chris@1
|
35 </td>
|
Chris@1
|
36 </tr>
|
Chris@1
|
37 </table>
|
Chris@1
|
38
|
Chris@1
|
39 <h3>Parameters</h3>
|
Chris@1
|
40 <dl>
|
Chris@1
|
41 <dt><i>vf</i></dt>
|
Chris@1
|
42 <dd>A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile
|
Chris@1
|
43 functions.</dd>
|
Chris@1
|
44 <dt><i>pcm_channels</i></dt>
|
Chris@1
|
45 <dd>A pointer to an output buffer. The pointer will be set to the decoded output buffer.</dd>
|
Chris@1
|
46 <dt><i>samples</i></dt>
|
Chris@1
|
47 <dd>Maximum number of decoded samples to produce.</dd>
|
Chris@1
|
48 <dt><i>bitstream</i></dt>
|
Chris@1
|
49 <dd>A pointer to the number of the current logical bitstream.</dd>
|
Chris@1
|
50 </dl>
|
Chris@1
|
51
|
Chris@1
|
52
|
Chris@1
|
53 <h3>Return Values</h3>
|
Chris@1
|
54 <blockquote>
|
Chris@1
|
55 <dl>
|
Chris@1
|
56 <dt>OV_HOLE</dt>
|
Chris@1
|
57 <dd>indicates there was an interruption in the data.
|
Chris@1
|
58 <br>(one of: garbage between pages, loss of sync followed by
|
Chris@1
|
59 recapture, or a corrupt page)</dd>
|
Chris@1
|
60 <dt>OV_EBADLINK</dt>
|
Chris@1
|
61 <dd>indicates that an invalid stream section was supplied to
|
Chris@1
|
62 libvorbisfile, or the requested link is corrupt.</dd>
|
Chris@1
|
63 <dt>OV_EINVAL</dt>
|
Chris@1
|
64 <dd>indicates the initial file headers couldn't be read or
|
Chris@1
|
65 are corrupt, or that the initial open call for <i>vf</i>
|
Chris@1
|
66 failed.</dd>
|
Chris@1
|
67 <dt>0</dt>
|
Chris@1
|
68 <dd>indicates EOF</dd>
|
Chris@1
|
69 <dt><i>n</i></dt>
|
Chris@1
|
70 <dd>indicates actual number of samples read. <tt>ov_read_float()</tt> will
|
Chris@1
|
71 decode at most one vorbis packet per invocation, so the value
|
Chris@1
|
72 returned will generally be less than <tt>length</tt>.
|
Chris@1
|
73 </dl>
|
Chris@1
|
74 </blockquote>
|
Chris@1
|
75
|
Chris@1
|
76 <h3>Notes</h3>
|
Chris@1
|
77 <p><b>Typical usage:</b>
|
Chris@1
|
78 <blockquote>
|
Chris@1
|
79 <tt>float **pcm;
|
Chris@1
|
80 samples_read = ov_read_float(&vf,pcm, 1024, &current_section)</tt>
|
Chris@1
|
81 </blockquote>
|
Chris@1
|
82
|
Chris@1
|
83 This decodes up to 1024 float samples.
|
Chris@1
|
84 </p>
|
Chris@1
|
85
|
Chris@1
|
86 <br>
|
Chris@1
|
87 <br><br>
|
Chris@1
|
88 <hr noshade>
|
Chris@1
|
89 <table border=0 width=100%>
|
Chris@1
|
90 <tr valign=top>
|
Chris@1
|
91 <td><p class=tiny>copyright © 2002 vorbis team</p></td>
|
Chris@1
|
92 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td>
|
Chris@1
|
93 </tr><tr>
|
Chris@1
|
94 <td><p class=tiny>Vorbisfile documentation</p></td>
|
Chris@1
|
95 <td align=right><p class=tiny>vorbisfile version 1.3.2 - 20101101</p></td>
|
Chris@1
|
96 </tr>
|
Chris@1
|
97 </table>
|
Chris@1
|
98
|
Chris@1
|
99
|
Chris@1
|
100 </body>
|
Chris@1
|
101
|
Chris@1
|
102 </html>
|
Chris@1
|
103
|
Chris@1
|
104
|
Chris@1
|
105
|