Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/libvorbis-1.2.0/doc/vorbisfile/ov_read_float.html @ 16

Last change on this file since 16 was 16, checked in by landauf, 17 years ago

added libvorbis

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