<!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="Up" href="index.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"><link title="Exceptions" rel="Section" href="#1_Exceptions"> <link title="Useful types" rel="Section" href="#1_Usefultypes"> <link title="Operations with vorbis streams" rel="Section" href="#1_Operationswithvorbisstreams"> <link title="Operations with vorbis files" rel="Section" href="#1_Operationswithvorbisfiles"> <link title="Encoding" rel="Subsection" href="#2_Encoding"> <link title="Decoding" rel="Subsection" href="#2_Decoding"> <link title="Decoding" rel="Subsection" href="#2_Decoding"> <title>Vorbis</title> </head> <body> <div class="navbar"> <a href="index.html">Up</a> </div> <center><h1>Module <a href="type_Vorbis.html">Vorbis</a></h1></center> <br> <pre><span class="keyword">module</span> Vorbis: <code class="code">sig</code> <a href="Vorbis.html">..</a> <code class="code">end</code></pre> Decode from or encode to the Ogg Vorbis compressed audio format; or get informations about an Ogg Vorbis file. <p> <br> <b>Author(s):</b> Samuel Mimram, Julien Cristau, David Baelde<br> <hr width="100%"> <br> <a name="1_Exceptions"></a> <h1>Exceptions</h1><br> <pre><span class="keyword">exception</span> <a name="EXCEPTIONFalse"></a>False</pre> <div class="info"> The call returned a 'false' status (eg, ov_bitrate_instant can return OV_FALSE if playback is not in progress, and thus there is no instantaneous bitrate information to report.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONInvalid_parameters"></a>Invalid_parameters</pre> <div class="info"> Some parameters are invalid for this function.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONInvalid_quality"></a>Invalid_quality</pre> <div class="info"> The given quality in invalid.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONInvalid_bitrate"></a>Invalid_bitrate</pre> <div class="info"> The given bitrate is invalid.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONInvalid_channels"></a>Invalid_channels</pre> <div class="info"> The given number of channels is invalid.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONInvalid_sample_freq"></a>Invalid_sample_freq</pre> <div class="info"> The given sampling frequency is invalid.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONInvalid_argument"></a>Invalid_argument</pre> <div class="info"> Invalid setup request, e.g. out of range argument.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONCould_not_open_file"></a>Could_not_open_file</pre> <div class="info"> The given file could not be opened.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONNot_vorbis"></a>Not_vorbis</pre> <div class="info"> Bitstream is not Vorbis data.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONBad_header"></a>Bad_header</pre> <div class="info"> Invalid Vorbis bitstream header.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONRead_error"></a>Read_error</pre> <div class="info"> A read from media returned an error.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONNot_audio"></a>Not_audio</pre> <div class="info"> Ogg packet doesn't contain audio data<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONInternal_fault"></a>Internal_fault</pre> <div class="info"> Internal logic fault; indicates a bug or heap/stack corruption.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONHole_in_data"></a>Hole_in_data</pre> <div class="info"> Indicates there was an interruption in the data (one of: garbage between pages, loss of sync followed by recapture, or a corrupt page).<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONBad_link"></a>Bad_link</pre> <div class="info"> Indicates that an invalid stream section was supplied, or the requested link is corrupt.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONVersion_mismatch"></a>Version_mismatch</pre> <div class="info"> Invalid Vorbis bitstream header.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONNot_implemented"></a>Not_implemented</pre> <div class="info"> Unimplemented mode.<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONUnknown_error"></a>Unknown_error <span class="keyword">of</span> <code class="type">int</code></pre> <div class="info"> An unknown error happened (it should not have happened, please report).<br> </div> <pre><span class="keyword">exception</span> <a name="EXCEPTIONUtf8_failure"></a>Utf8_failure <span class="keyword">of</span> <code class="type">string</code></pre> <div class="info"> Error while converting utf8.<br> </div> <br> <a name="1_Usefultypes"></a> <h1>Useful types</h1><br> <pre><span class="keyword">type</span> <a name="TYPEbitstream"></a><code class="type"></code>bitstream = <code class="type">int</code> </pre> <div class="info"> Index of a logical bitstream. The special value -1 means the physical bitsream.<br> </div> <br><code><span class="keyword">type</span> <a name="TYPEinfo"></a><code class="type"></code>info = {</code><table class="typetable"> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>vorbis_version : <code class="type">int</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >version of vorbis codec, must be 0</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>audio_channels : <code class="type">int</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >number of audio channels</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>audio_samplerate : <code class="type">int</code>;</code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >samplerate in Hertz</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>bitrate_upper : <code class="type">int</code>;</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>bitrate_nominal : <code class="type">int</code>;</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>bitrate_lower : <code class="type">int</code>;</code></td> </tr> <tr> <td align="left" valign="top" > <code> </code></td> <td align="left" valign="top" > <code>bitrate_window : <code class="type">int</code>;</code></td> </tr></table> } <div class="info"> Vorbis informations about a file.<br> </div> <pre><span class="keyword">val</span> <a name="VALtags"></a>tags : <code class="type">?title:string -><br> ?artist:string -><br> ?genre:string -><br> ?date:string -><br> ?album:string -><br> ?tracknumber:string -> ?comment:string -> unit -> (string * string) list</code></pre><div class="info"> Create a list of vorbis tags.<br> </div> <br> <a name="1_Operationswithvorbisstreams"></a> <h1>Operations with vorbis streams</h1><br> <br> <a name="2_Encoding"></a> <h2>Encoding</h2><br> <pre><span class="keyword">module</span> <a href="Vorbis.Encoder.html">Encoder</a>: <code class="code">sig</code> <a href="Vorbis.Encoder.html">..</a> <code class="code">end</code></pre><br> <a name="2_Decoding"></a> <h2>Decoding</h2><br> <pre><span class="keyword">module</span> <a href="Vorbis.Decoder.html">Decoder</a>: <code class="code">sig</code> <a href="Vorbis.Decoder.html">..</a> <code class="code">end</code></pre><br> <a name="1_Operationswithvorbisfiles"></a> <h1>Operations with vorbis files</h1><br> <br> <a name="2_Decoding"></a> <h2>Decoding</h2><br> <pre><span class="keyword">module</span> <a href="Vorbis.File.html">File</a>: <code class="code">sig</code> <a href="Vorbis.File.html">..</a> <code class="code">end</code></pre><pre><span class="keyword">module</span> <a href="Vorbis.Skeleton.html">Skeleton</a>: <code class="code">sig</code> <a href="Vorbis.Skeleton.html">..</a> <code class="code">end</code></pre></body></html>