<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Status (libmpdclient.Mpd.Status)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> â€“ <a href="../../index.html">libmpdclient</a> &#x00BB; <a href="../index.html">Mpd</a> &#x00BB; Status</nav><h1>Module <code>Mpd.Status</code></h1></header><aside><p>Status : get informations on the current status of the Mpd server.</p></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type </span>t</code></dt><dd><p>Main status type that contains all the status information of the server.</p></dd></dl><dl><dt class="spec type" id="type-state"><a href="#type-state" class="anchor"></a><code><span class="keyword">type </span>state</code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-state.Play" class="anchored"><td class="def constructor"><a href="#type-state.Play" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Play</span></code></td></tr><tr id="type-state.Pause" class="anchored"><td class="def constructor"><a href="#type-state.Pause" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Pause</span></code></td></tr><tr id="type-state.Stop" class="anchored"><td class="def constructor"><a href="#type-state.Stop" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Stop</span></code></td></tr><tr id="type-state.ErrState" class="anchored"><td class="def constructor"><a href="#type-state.ErrState" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">ErrState</span></code></td><td class="doc"><p>Current state (playing, pause or stopped) of the mpd server.</p></td></tr></table></dt></dl><dl><dt class="spec value" id="val-string_of_state"><a href="#val-string_of_state" class="anchor"></a><code><span class="keyword">val </span>string_of_state : <a href="index.html#type-state">state</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Get the string representation of a state.</p></dd></dl><dl><dt class="spec value" id="val-parse"><a href="#val-parse" class="anchor"></a><code><span class="keyword">val </span>parse : string list <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Parse list of strings into a Mpd Status type</p></dd></dl><dl><dt class="spec value" id="val-volume"><a href="#val-volume" class="anchor"></a><code><span class="keyword">val </span>volume : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the volume level from a Mpd Status</p></dd></dl><dl><dt class="spec value" id="val-repeat"><a href="#val-repeat" class="anchor"></a><code><span class="keyword">val </span>repeat : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Find out if the player is in repeat mode</p></dd></dl><dl><dt class="spec value" id="val-random"><a href="#val-random" class="anchor"></a><code><span class="keyword">val </span>random : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Find out if the player is in random mode</p></dd></dl><dl><dt class="spec value" id="val-single"><a href="#val-single" class="anchor"></a><code><span class="keyword">val </span>single : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Find out if the player is in single mode</p></dd></dl><dl><dt class="spec value" id="val-consume"><a href="#val-consume" class="anchor"></a><code><span class="keyword">val </span>consume : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Find out if the player is in consume mode</p></dd></dl><dl><dt class="spec value" id="val-playlist"><a href="#val-playlist" class="anchor"></a><code><span class="keyword">val </span>playlist : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the current playlist id</p></dd></dl><dl><dt class="spec value" id="val-playlistlength"><a href="#val-playlistlength" class="anchor"></a><code><span class="keyword">val </span>playlistlength : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the current playlist length</p></dd></dl><dl><dt class="spec value" id="val-state"><a href="#val-state" class="anchor"></a><code><span class="keyword">val </span>state : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-state">state</a></code></dt><dd><p>Get the state of the player : Play / Pause / Stop</p></dd></dl><dl><dt class="spec value" id="val-song"><a href="#val-song" class="anchor"></a><code><span class="keyword">val </span>song : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the song number of the current song stopped on or playing</p></dd></dl><dl><dt class="spec value" id="val-songid"><a href="#val-songid" class="anchor"></a><code><span class="keyword">val </span>songid : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the song id of the current song stopped on or playing</p></dd></dl><dl><dt class="spec value" id="val-nextsong"><a href="#val-nextsong" class="anchor"></a><code><span class="keyword">val </span>nextsong : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the next song number based on the current song stopped on or playing</p></dd></dl><dl><dt class="spec value" id="val-nextsongid"><a href="#val-nextsongid" class="anchor"></a><code><span class="keyword">val </span>nextsongid : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the next song id based on the current song stopped on or playing</p></dd></dl><dl><dt class="spec value" id="val-time"><a href="#val-time" class="anchor"></a><code><span class="keyword">val </span>time : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Get the total time elapsed (of current playing/paused song)</p></dd></dl><dl><dt class="spec value" id="val-elapsed"><a href="#val-elapsed" class="anchor"></a><code><span class="keyword">val </span>elapsed : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>Get the total time elapsed within the current song, but with higher resolution</p></dd></dl><dl><dt class="spec value" id="val-duration"><a href="#val-duration" class="anchor"></a><code><span class="keyword">val </span>duration : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>Returns the totatl duration of the current song in seconds</p></dd></dl><dl><dt class="spec value" id="val-bitrate"><a href="#val-bitrate" class="anchor"></a><code><span class="keyword">val </span>bitrate : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the instantaneous bitrate in kbps</p></dd></dl><dl><dt class="spec value" id="val-xfade"><a href="#val-xfade" class="anchor"></a><code><span class="keyword">val </span>xfade : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the crossfade in seconds of the current song</p></dd></dl><dl><dt class="spec value" id="val-mixrampdb"><a href="#val-mixrampdb" class="anchor"></a><code><span class="keyword">val </span>mixrampdb : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>Get the mixramp threshold in dB</p></dd></dl><dl><dt class="spec value" id="val-mixrampdelay"><a href="#val-mixrampdelay" class="anchor"></a><code><span class="keyword">val </span>mixrampdelay : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>Get the mixrampdelay in seconds</p></dd></dl><dl><dt class="spec value" id="val-audio"><a href="#val-audio" class="anchor"></a><code><span class="keyword">val </span>audio : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Get information of the audio file of the current song (sampleRate:bits:channels)</p></dd></dl><dl><dt class="spec value" id="val-updating_db"><a href="#val-updating_db" class="anchor"></a><code><span class="keyword">val </span>updating_db : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Get the job id</p></dd></dl><dl><dt class="spec value" id="val-error"><a href="#val-error" class="anchor"></a><code><span class="keyword">val </span>error : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Get the error message if there is one</p></dd></dl></div></body></html>