<!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="next" href="Vorbis.Decoder.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.Encoder</title> </head> <body> <div class="navbar"> <a href="Vorbis.html">Up</a> <a href="Vorbis.Decoder.html">Next</a> </div> <center><h1>Module <a href="type_Vorbis.Encoder.html">Vorbis.Encoder</a></h1></center> <br> <pre><span class="keyword">module</span> Encoder: <code class="code">sig</code> <a href="Vorbis.Encoder.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 state of an encoder.<br> </div> <pre><span class="keyword">val</span> <a name="VALcreate"></a>create : <code class="type">int -> int -> int -> int -> int -> <a href="Vorbis.Encoder.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">create chans rate max_br nom_br min_br</code> creates a new encoder with <code class="code">chans</code> channels, with sample rate <code class="code">rate</code> Hz and with respectively <code class="code">max_br</code>, <code class="code">nom_br</code> and <code class="code">min_br</code> as maximal, nominal and minimal bitrates (in bps).<br> </div> <pre><span class="keyword">val</span> <a name="VALcreate_vbr"></a>create_vbr : <code class="type">int -> int -> float -> <a href="Vorbis.Encoder.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">create_vbr chans rate quality</code> creates a new encoder in variable bitrate with <code class="code">chans</code> channels, with sample rate <code class="code">rate</code> Hz and with quality <code class="code">quality</code>, which should be between -1 and 1 (1 is the best).<br> </div> <pre><span class="keyword">val</span> <a name="VALreset"></a>reset : <code class="type"><a href="Vorbis.Encoder.html#TYPEt">t</a> -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALheaderout"></a>headerout : <code class="type"><a href="Vorbis.Encoder.html#TYPEt">t</a> -> Ogg.Stream.t -> (string * string) list -> unit</code></pre><div class="info"> Encode a header given a list of tags.<br> </div> <pre><span class="keyword">val</span> <a name="VALheaderout_packetout"></a>headerout_packetout : <code class="type"><a href="Vorbis.Encoder.html#TYPEt">t</a> -><br> (string * string) list -><br> Ogg.Stream.packet * Ogg.Stream.packet * Ogg.Stream.packet</code></pre><div class="info"> Encoder a header, but do not submit packet to Ogg Stream. Usefull when multiplexing ogg streams since the all first packets of each streams must be packed in the initial pages.<br> </div> <pre><span class="keyword">val</span> <a name="VALencode_buffer_float"></a>encode_buffer_float : <code class="type"><a href="Vorbis.Encoder.html#TYPEt">t</a> -> Ogg.Stream.t -> float array array -> int -> int -> unit</code></pre><div class="info"> Encode a buffer of PCM data.<br> </div> <pre><span class="keyword">val</span> <a name="VALtime_of_granulepos"></a>time_of_granulepos : <code class="type"><a href="Vorbis.Encoder.html#TYPEt">t</a> -> Int64.t -> Nativeint.t</code></pre><div class="info"> Convert a granulepos to absolute time in seconds. The granulepos is interpreted in the context of a given encoder, and gives the end time of a frame's presentation as used in Ogg mux ordering.<br> </div> <pre><span class="keyword">val</span> <a name="VALend_of_stream"></a>end_of_stream : <code class="type"><a href="Vorbis.Encoder.html#TYPEt">t</a> -> Ogg.Stream.t -> unit</code></pre></body></html>