<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="Vorbis.Encoder.html"> <link rel="next" href="Vorbis.File.html"> <link rel="Up" href="Vorbis.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Vorbis" rel="Chapter" href="Vorbis.html"><title>Vorbis.Decoder</title> </head> <body> <div class="navbar"><a href="Vorbis.Encoder.html">Previous</a> <a href="Vorbis.html">Up</a> <a href="Vorbis.File.html">Next</a> </div> <center><h1>Module <a href="type_Vorbis.Decoder.html">Vorbis.Decoder</a></h1></center> <br> <pre><span class="keyword">module</span> Decoder: <code class="code">sig</code> <a href="Vorbis.Decoder.html">..</a> <code class="code">end</code></pre><hr width="100%"> <pre><span class="keyword">type</span> <a name="TYPEt"></a><code class="type"></code>t </pre> <div class="info"> Internal decoder state<br> </div> <pre><span class="keyword">val</span> <a name="VALinit"></a>init : <code class="type">Ogg.Stream.packet -><br> Ogg.Stream.packet -> Ogg.Stream.packet -> <a href="Vorbis.Decoder.html#TYPEt">t</a></code></pre><div class="info"> Initialize decoder. Needs the first 3 packets of the ogg logical stream. Use <code class="code">check_packet</code> to check against the first one.<br> </div> <pre><span class="keyword">val</span> <a name="VALinfo"></a>info : <code class="type"><a href="Vorbis.Decoder.html#TYPEt">t</a> -> <a href="Vorbis.html#TYPEinfo">Vorbis.info</a></code></pre><div class="info"> Get vorbis infos from the decoder<br> </div> <pre><span class="keyword">val</span> <a name="VALcomments"></a>comments : <code class="type"><a href="Vorbis.Decoder.html#TYPEt">t</a> -> string * (string * string) list</code></pre><div class="info"> Get vorbis comments from the decoder<br> </div> <pre><span class="keyword">val</span> <a name="VALcheck_packet"></a>check_packet : <code class="type">Ogg.Stream.packet -> bool</code></pre><div class="info"> Check wether a ogg packet contains vorbis data. Usefull for parsing ogg containers with multiple streams.<br> </div> <pre><span class="keyword">val</span> <a name="VALdecode_pcm"></a>decode_pcm : <code class="type"><a href="Vorbis.Decoder.html#TYPEt">t</a> -> Ogg.Stream.t -> float array array -> int -> int -> int</code></pre><div class="info"> <code class="code">decode_pcm dec stream buffer pos offset</code> decodes pcm float data from <code class="code">stream</code>. The floats are written in <code class="code">buffer</code>, starting at position <code class="code">pos</code>. The function returns the number of samples actually written.<br> </div> <pre><span class="keyword">val</span> <a name="VALrestart"></a>restart : <code class="type"><a href="Vorbis.Decoder.html#TYPEt">t</a> -> unit</code></pre><div class="info"> Restart the decoder<br> </div> </body></html>