annotate src/libvorbis-1.3.3/doc/vorbisfile/ov_read_float.html @ 86:98c1576536ae

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