Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
375 lines (280 sloc) 57.2 KB
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <title>Cl-Out123</title> <meta name="viewport" content="width=device-width"> <meta name="description" content="Bindings to libout123, providing cross-platform audio output."> <meta name="author" content="Nicolas Hafner &lt;shinmera@tymoon.eu&gt;"> <style type="text/css"> body{
max-width: 1024px;
margin: 0 auto 0 auto;
font-family: sans-serif;
color: #333333;
font-size: 14pt;
padding: 5px;
}
body>header{
display:flex;
align-items: center;
justify-content: center;
flex-direction: column;
max-width: 100%;
text-align: center;
}
body>header img{
max-width: 50%;
}
img{
max-width: 100%;
max-height: 100%;
}
code{
font-family: Consolas, Inconsolata, monospace;
}
a{
text-decoration: none;
color: #0055AA;
}
a img{
border: none;
}
#documentation{
text-align: justify;
}
#documentation pre{
margin-left: 20px;
overflow: auto;
}
#documentation img{
margin: 5px;
}
#symbol-index>ul{
list-style: none;
padding: 0;
}
#symbol-index .package>ul{
list-style: none;
padding: 0 0 0 10px;
}
#symbol-index .package .nicknames{
font-weight: normal;
}
#symbol-index .package h4{
display: inline-block;
margin: 0;
}
#symbol-index .package article{
margin: 0 0 15px 0;
}
#symbol-index .package article header{
font-size: 1.2em;
font-weight: normal;
}
#symbol-index .package .name{
margin-right: 5px;
}
#symbol-index .package .docstring{
margin: 0 0 0 15px;
white-space: pre-wrap;
font-size: 12pt;
}
@media (max-width: 800px){
body{font-size: 12pt;}
} </style> </head> <body> <header> <h1>cl-out123</h1> <span class="version">1.0.0</span> <p class="description">Bindings to libout123, providing cross-platform audio output.</p> </header> <main> <article id="documentation"> <div><h2 id="about_cl-out123">About cl-out123</h2> <p>This is a bindings library to <a href="https://www.mpg123.de/api/">libout123</a> which allows easy cross-platform audio playback.</p> <h2 id="how_to">How To</h2> <p>Precompiled versions of the underlying library are included in this. If you want to build it manually however, refer to the <a href="https://www.mpg123.de/">mpg123</a> page.</p> <p>Load the system through ASDF or Quicklisp:</p> <pre><code>(ql:quickload :cl-out123)
</code></pre> <p>Create a new output object:</p> <pre><code>(<a href="http://l1sp.org/cl/defvar">defvar</a> *out* (<a href="http://l1sp.org/cl/make-instance">make-instance</a> 'cl-out123:output))
</code></pre> <p>This will initialise a standard output handler object for you, based on some hopefully sane defaults. We can now look at a list of possible drivers:</p> <pre><code>(<a href="#CL-OUT123:DRIVERS">cl-out123:drivers</a> *out*)
</code></pre> <p>If we're fine with the automatic default or now have a backend we know we want to use, we can connect to it:</p> <pre><code>(<a href="#CL-OUT123:CONNECT">cl-out123:connect</a> *out* :driver &quot;pulse&quot;)
</code></pre> <p>Now that we have a stable connection to the sound system, we can query it for possible output formats:</p> <pre><code>(<a href="#CL-OUT123:FORMATS">cl-out123:formats</a> *out* '(44100) 1 2)
</code></pre> <p>Finally once we have figured out a proper format to use, or again are fine with the default, we can start playback to the device:</p> <pre><code>(<a href="#CL-OUT123:START">cl-out123:start</a> *out* :rate 44100 :channels 2 :encoding :int16)
</code></pre> <p>Now buffered audio data that conforms to the format we picked can be sent to be played back using <code><a href="#CL-OUT123-CFFI:PLAY">play</a></code> or <code><a href="#CL-OUT123:PLAY-DIRECTLY">play-directly</a></code>:</p> <pre><code>(<a href="#CL-OUT123:PLAY">cl-out123:play</a> *out* #(...))
</code></pre> <p>It will return you the amount of bytes it actually managed to play back. If need be, playback can also be <code><a href="#CL-OUT123-CFFI:PAUSE">pause</a></code>d, <code><a href="#CL-OUT123:RESUME">resume</a></code>d, and <code><a href="#CL-OUT123-CFFI:STOP">stop</a></code>ped. Currently buffered data can be <code><a href="#CL-OUT123-CFFI:DROP">drop</a></code>ped, or <code><a href="#CL-OUT123-CFFI:DRAIN">drain</a></code>ed too to allow you to synchronise things.</p> <p>Once we're done, simply <code><a href="#CL-OUT123-CFFI:STOP">stop</a></code> the output object:</p> <pre><code>(<a href="#CL-OUT123:STOP">cl-out123:stop</a> *out*)
</code></pre> <p>If for some reason you find yourself needing to change output format or device after having initialised your output already, you can reconfigure it using <code><a href="http://l1sp.org/cl/reinitialize-instance">reinitialize-instance</a></code>. This will cause your current playback to end if it is currently running, but should otherwise phase over smoothly.</p> <pre><code>(<a href="http://l1sp.org/cl/reinitialize-instance">reinitialize-instance</a> *out* :driver &quot;alsa&quot;)
</code></pre> <p>There is no need to explicitly deallocate or clean up data. As soon as the output object is garbage collected, the cleanup will be handled for you automatically. If you would like to explicitly close the connection anyway:</p> <pre><code>(<a href="#CL-OUT123:DISCONNECT">cl-out123:disconnect</a> *out*)
</code></pre> <p>And that's pretty much all there is to it. The heavy burden falls onto you to get the audio data ready in the proper format for it to be played back. The actual transfer process to the sound system should be easy with this library.</p> </div> </article> <article id="copyright"> <h2>Copyright</h2> <span>cl-out123</span> is licensed under the <span><a href="https://tldrlegal.com/search?q=Artistic">Artistic</a></span> license. © <span>Nicolas Hafner &lt;shinmera@tymoon.eu&gt;</span> . This library can be obtained on <a href="https://github.com/Shirakumo/cl-out123">https://github.com/Shirakumo/cl-out123</a>. </article> <article id="symbol-index"> <h2>Package Index</h2> <ul><li class="package"> <h3> <a name="CL-OUT123-CFFI" href="#CL-OUT123-CFFI">CL-OUT123-CFFI</a> <span class="nicknames">(ORG.SHIRAKUMO.FRAF.OUT123.CFFI)</span> </h3> <ul><li> <a name="CL-OUT123-CFFI:*STATIC*"> </a> <article id="SPECIAL CL-OUT123-CFFI:*STATIC*"> <header class="special"> <span class="type">special</span> <h4 class="name"><code><a href="#SPECIAL%20CL-OUT123-CFFI%3A%2ASTATIC%2A">*STATIC*</a></code></h4> </header> <div class="docstring"><pre>Variable containing a pathname to the static directory.</pre></div> </article> </li><li> <a name="CL-OUT123-CFFI:FMT"> </a> <article id="CLASS CL-OUT123-CFFI:FMT"> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#CLASS%20CL-OUT123-CFFI%3AFMT">FMT</a></code></h4> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:HANDLE"> </a> <article id="CLASS CL-OUT123-CFFI:HANDLE"> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#CLASS%20CL-OUT123-CFFI%3AHANDLE">HANDLE</a></code></h4> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ERROR"> </a> <article id="CONDITION CL-OUT123-CFFI:ERROR"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123-CFFI%3AERROR">ERROR</a></code></h4> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:FMT-CHANNELS"> </a> <article id="ACCESSOR CL-OUT123-CFFI:FMT-CHANNELS"> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#ACCESSOR%20CL-OUT123-CFFI%3AFMT-CHANNELS">FMT-CHANNELS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">POINTER-TO-FMT</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:FMT-ENCODING"> </a> <article id="ACCESSOR CL-OUT123-CFFI:FMT-ENCODING"> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#ACCESSOR%20CL-OUT123-CFFI%3AFMT-ENCODING">FMT-ENCODING</a></code></h4> <code class="qualifiers"></code> <code class="arguments">POINTER-TO-FMT</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:FMT-RATE"> </a> <article id="ACCESSOR CL-OUT123-CFFI:FMT-RATE"> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#ACCESSOR%20CL-OUT123-CFFI%3AFMT-RATE">FMT-RATE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">POINTER-TO-FMT</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:BUFFERED"> </a> <article id="FUNCTION CL-OUT123-CFFI:BUFFERED"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ABUFFERED">BUFFERED</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:CLOSE"> </a> <article id="FUNCTION CL-OUT123-CFFI:CLOSE"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ACLOSE">CLOSE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:CONTINUE"> </a> <article id="FUNCTION CL-OUT123-CFFI:CONTINUE"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ACONTINUE">CONTINUE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:DEL"> </a> <article id="FUNCTION CL-OUT123-CFFI:DEL"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ADEL">DEL</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:DRAIN"> </a> <article id="FUNCTION CL-OUT123-CFFI:DRAIN"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ADRAIN">DRAIN</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:DRIVER-INFO"> </a> <article id="FUNCTION CL-OUT123-CFFI:DRIVER-INFO"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ADRIVER-INFO">DRIVER-INFO</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE DRIVER DEVICE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:DRIVERS"> </a> <article id="FUNCTION CL-OUT123-CFFI:DRIVERS"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ADRIVERS">DRIVERS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE NAMES DESCR</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:DROP"> </a> <article id="FUNCTION CL-OUT123-CFFI:DROP"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ADROP">DROP</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ENC-BYNAME"> </a> <article id="FUNCTION CL-OUT123-CFFI:ENC-BYNAME"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AENC-BYNAME">ENC-BYNAME</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ENC-LIST"> </a> <article id="FUNCTION CL-OUT123-CFFI:ENC-LIST"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AENC-LIST">ENC-LIST</a></code></h4> <code class="qualifiers"></code> <code class="arguments">ENCLIST</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ENC-LONGNAME"> </a> <article id="FUNCTION CL-OUT123-CFFI:ENC-LONGNAME"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AENC-LONGNAME">ENC-LONGNAME</a></code></h4> <code class="qualifiers"></code> <code class="arguments">ENCODING</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ENC-NAME"> </a> <article id="FUNCTION CL-OUT123-CFFI:ENC-NAME"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AENC-NAME">ENC-NAME</a></code></h4> <code class="qualifiers"></code> <code class="arguments">ENCODING</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ENCODINGS"> </a> <article id="FUNCTION CL-OUT123-CFFI:ENCODINGS"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AENCODINGS">ENCODINGS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE RATE CHANNELS</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ENCSIZE"> </a> <article id="FUNCTION CL-OUT123-CFFI:ENCSIZE"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AENCSIZE">ENCSIZE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">ENCODING</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ERRCODE"> </a> <article id="FUNCTION CL-OUT123-CFFI:ERRCODE"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AERRCODE">ERRCODE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:ERROR"> </a> <article id="FUNCTION CL-OUT123-CFFI:ERROR"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AERROR">ERROR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">DATUM &amp;REST ARGUMENTS</code><code>)</code> </header> <div class="docstring"><pre>Invoke the signal facility on a condition formed from DATUM and ARGUMENTS.
If the condition is not handled, the debugger is invoked.</pre></div> </article> </li><li> <a name="CL-OUT123-CFFI:FORMATS"> </a> <article id="FUNCTION CL-OUT123-CFFI:FORMATS"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AFORMATS">FORMATS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE RATES RATECOUNT MINCHANNELS MAXCHANNELS FMTLIST</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:GETFORMAT"> </a> <article id="FUNCTION CL-OUT123-CFFI:GETFORMAT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AGETFORMAT">GETFORMAT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE RATE CHANNELS ENCODING FRAMESIZE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:GETPARAM"> </a> <article id="FUNCTION CL-OUT123-CFFI:GETPARAM"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AGETPARAM">GETPARAM</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE RET-VALUE RET-FVALUE RET-SVALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:GETPARAM-FLOAT"> </a> <article id="FUNCTION CL-OUT123-CFFI:GETPARAM-FLOAT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AGETPARAM-FLOAT">GETPARAM-FLOAT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE VALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:GETPARAM-INT"> </a> <article id="FUNCTION CL-OUT123-CFFI:GETPARAM-INT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AGETPARAM-INT">GETPARAM-INT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE VALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:GETPARAM-STRING"> </a> <article id="FUNCTION CL-OUT123-CFFI:GETPARAM-STRING"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AGETPARAM-STRING">GETPARAM-STRING</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE VALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:NDRAIN"> </a> <article id="FUNCTION CL-OUT123-CFFI:NDRAIN"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ANDRAIN">NDRAIN</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE BYTES</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:NEW"> </a> <article id="FUNCTION CL-OUT123-CFFI:NEW"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ANEW">NEW</a></code></h4> <code class="qualifiers"></code> <code class="arguments"></code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:OPEN"> </a> <article id="FUNCTION CL-OUT123-CFFI:OPEN"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3AOPEN">OPEN</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE DRIVER DEVICE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PARAM"> </a> <article id="FUNCTION CL-OUT123-CFFI:PARAM"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APARAM">PARAM</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE VALUE FVALUE SVALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PARAM-FLOAT"> </a> <article id="FUNCTION CL-OUT123-CFFI:PARAM-FLOAT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APARAM-FLOAT">PARAM-FLOAT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE VALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PARAM-FROM"> </a> <article id="FUNCTION CL-OUT123-CFFI:PARAM-FROM"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APARAM-FROM">PARAM-FROM</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE HANDLE-FROM</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PARAM-INT"> </a> <article id="FUNCTION CL-OUT123-CFFI:PARAM-INT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APARAM-INT">PARAM-INT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE VALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PARAM-STRING"> </a> <article id="FUNCTION CL-OUT123-CFFI:PARAM-STRING"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APARAM-STRING">PARAM-STRING</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE CODE VALUE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PAUSE"> </a> <article id="FUNCTION CL-OUT123-CFFI:PAUSE"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APAUSE">PAUSE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PLAIN-STRERROR"> </a> <article id="FUNCTION CL-OUT123-CFFI:PLAIN-STRERROR"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APLAIN-STRERROR">PLAIN-STRERROR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">ERRCODE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:PLAY"> </a> <article id="FUNCTION CL-OUT123-CFFI:PLAY"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3APLAY">PLAY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE BUFFER BYTES</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:SET-BUFFER"> </a> <article id="FUNCTION CL-OUT123-CFFI:SET-BUFFER"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ASET-BUFFER">SET-BUFFER</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE BUFFER-BYTES</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:START"> </a> <article id="FUNCTION CL-OUT123-CFFI:START"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ASTART">START</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE RATE CHANNELS ENCODING</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:STOP"> </a> <article id="FUNCTION CL-OUT123-CFFI:STOP"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ASTOP">STOP</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123-CFFI:STRERROR"> </a> <article id="FUNCTION CL-OUT123-CFFI:STRERROR"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123-CFFI%3ASTRERROR">STRERROR</a></code></h4> <code class="qualifiers"></code> <code class="arguments">HANDLE</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li></ul> </li><li class="package"> <h3> <a name="CL-OUT123" href="#CL-OUT123">CL-OUT123</a> <span class="nicknames">(ORG.SHIRAKUMO.FRAF.OUT123)</span> </h3> <ul><li> <a name="CL-OUT123:OUTPUT"> </a> <article id="CLASS CL-OUT123:OUTPUT"> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#CLASS%20CL-OUT123%3AOUTPUT">OUTPUT</a></code></h4> </header> <div class="docstring"><pre>Class representing an output to a sound playback device.
This holds all the necessary state and information in order to connect and
play back audio data to a device.
Some options can only be changed by closing and opening a new connection to
the backend. In order to do this, you can use REINITIALIZE-INSTANCE. It will
attempt to preserve state across reinitialisation, but pending sound data
will be disposed off immediately as to not block.
See <a href="#CL-OUT123-CFFI:HANDLE">HANDLE</a>
See <a href="#CL-OUT123:PLAYING">PLAYING</a>
See <a href="#CL-OUT123:CONNECTED">CONNECTED</a>
See <a href="#CL-OUT123:DRIVER">DRIVER</a>
See <a href="#CL-OUT123:DEVICE">DEVICE</a>
See <a href="#CL-OUT123:RATE">RATE</a>
See <a href="#CL-OUT123:CHANNELS">CHANNELS</a>
See <a href="#CL-OUT123:ENCODING">ENCODING</a>
See <a href="#CL-OUT123:OUTPUT-TO">OUTPUT-TO</a>
See <a href="#CL-OUT123:PRELOAD">PRELOAD</a>
See <a href="#CL-OUT123:GAIN">GAIN</a>
See <a href="#CL-OUT123:DEVICE-BUFFER">DEVICE-BUFFER</a>
See <a href="#CL-OUT123:NAME">NAME</a>
See <a href="NIL">OUTPUT-LOCK</a></pre></div> </article> </li><li> <a name="CL-OUT123:ALREADY-CONNECTED"> </a> <article id="CONDITION CL-OUT123:ALREADY-CONNECTED"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3AALREADY-CONNECTED">ALREADY-CONNECTED</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if an attempt is made to connect again while the output is still connected.
See <a href="#CL-OUT123:OUTPUT-ERROR">OUTPUT-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:BUFFER-SET-FAILED"> </a> <article id="CONDITION CL-OUT123:BUFFER-SET-FAILED"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3ABUFFER-SET-FAILED">BUFFER-SET-FAILED</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if the setting of the background buffer fails.
See <a href="#CL-OUT123:ERROR-STRING-ERROR">ERROR-STRING-ERROR</a>
See <a href="#CL-OUT123:BYTES">BYTES</a></pre></div> </article> </li><li> <a name="CL-OUT123:CONNECTION-FAILED"> </a> <article id="CONDITION CL-OUT123:CONNECTION-FAILED"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3ACONNECTION-FAILED">CONNECTION-FAILED</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if the connection of an output to its device fails.
See <a href="#CL-OUT123:ERROR-STRING-ERROR">ERROR-STRING-ERROR</a>
See <a href="#CL-OUT123:DRIVER">DRIVER</a>
See <a href="#CL-OUT123:DEVICE">DEVICE</a></pre></div> </article> </li><li> <a name="CL-OUT123:CREATION-FAILURE"> </a> <article id="CONDITION CL-OUT123:CREATION-FAILURE"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3ACREATION-FAILURE">CREATION-FAILURE</a></code></h4> </header> <div class="docstring"><pre>Condition signalled in the case the allocation of the output handler fails.
See <a href="#CL-OUT123:OUTPUT-ERROR">OUTPUT-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:ERROR-STRING-ERROR"> </a> <article id="CONDITION CL-OUT123:ERROR-STRING-ERROR"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3AERROR-STRING-ERROR">ERROR-STRING-ERROR</a></code></h4> </header> <div class="docstring"><pre>Error condition superclass for errors that have an error-string from the out123 library.
See <a href="#CL-OUT123:ERROR-STRING">ERROR-STRING</a>
See <a href="#CL-OUT123:OUTPUT-ERROR">OUTPUT-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:FAILED-DRIVER-INFO"> </a> <article id="CONDITION CL-OUT123:FAILED-DRIVER-INFO"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3AFAILED-DRIVER-INFO">FAILED-DRIVER-INFO</a></code></h4> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123:FAILED-DRIVER-LISTING"> </a> <article id="CONDITION CL-OUT123:FAILED-DRIVER-LISTING"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3AFAILED-DRIVER-LISTING">FAILED-DRIVER-LISTING</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if the listing of available drivers fails for some reason.
See <a href="#CL-OUT123:OUTPUT-ERROR">OUTPUT-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:FAILED-FORMAT-LISTING"> </a> <article id="CONDITION CL-OUT123:FAILED-FORMAT-LISTING"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3AFAILED-FORMAT-LISTING">FAILED-FORMAT-LISTING</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if the listing of available formats fails for some reason.
See <a href="#CL-OUT123:OUTPUT-ERROR">OUTPUT-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:FAILED-PLAYBACK-FORMAT"> </a> <article id="CONDITION CL-OUT123:FAILED-PLAYBACK-FORMAT"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3AFAILED-PLAYBACK-FORMAT">FAILED-PLAYBACK-FORMAT</a></code></h4> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123:NOT-CONNECTED"> </a> <article id="CONDITION CL-OUT123:NOT-CONNECTED"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3ANOT-CONNECTED">NOT-CONNECTED</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if an operation is attempted that requires the output to be connected, but it isn't.
See <a href="#CL-OUT123:OUTPUT-ERROR">OUTPUT-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:OUTPUT-ERROR"> </a> <article id="CONDITION CL-OUT123:OUTPUT-ERROR"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3AOUTPUT-ERROR">OUTPUT-ERROR</a></code></h4> </header> <div class="docstring"><pre>Error condition superclass for all errors related to this library.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:PLAYBACK-FAILED"> </a> <article id="CONDITION CL-OUT123:PLAYBACK-FAILED"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3APLAYBACK-FAILED">PLAYBACK-FAILED</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if the playback of a buffer fails.
See <a href="#CL-OUT123:ERROR-STRING-ERROR">ERROR-STRING-ERROR</a>
See <a href="#CL-OUT123:BYTES">BYTES</a></pre></div> </article> </li><li> <a name="CL-OUT123:START-FAILED"> </a> <article id="CONDITION CL-OUT123:START-FAILED"> <header class="condition"> <span class="type">condition</span> <h4 class="name"><code><a href="#CONDITION%20CL-OUT123%3ASTART-FAILED">START-FAILED</a></code></h4> </header> <div class="docstring"><pre>Condition signalled if starting the device fails.
See <a href="#CL-OUT123:ERROR-STRING-ERROR">ERROR-STRING-ERROR</a>
See <a href="#CL-OUT123:RATE">RATE</a>
See <a href="#CL-OUT123:CHANNELS">CHANNELS</a>
See <a href="#CL-OUT123:ENCODING">ENCODING</a></pre></div> </article> </li><li> <a name="CL-OUT123:BUFFERED"> </a> <article id="ACCESSOR CL-OUT123:BUFFERED"> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#ACCESSOR%20CL-OUT123%3ABUFFERED">BUFFERED</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Returns the number of bytes that currently reside in the internal buffer.
This number changes constantly as audio is played back.
This is setfable. Once set, a fork occurs to spawn a
&quot;thread&quot; to process the buffer in in the background.
See <a href="http://l1sp.org/cl/the">the</a> &lt;out123.h&gt; file for more information.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:CONNECT"> </a> <article id="FUNCTION CL-OUT123:CONNECT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ACONNECT">CONNECT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT &amp;KEY (DRIVER (DRIVER OUTPUT)) (DEVICE (DEVICE OUTPUT))</code><code>)</code> </header> <div class="docstring"><pre>Connects the output to the requested driver and device.
The output must not be connected already.
If the connection was successful, the output's DRIVER and DEVICE
are updated to reflect the ones that were actually chosen by the
backend. This might differ from what you requested.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:DRIVER">DRIVER</a>
See <a href="#CL-OUT123:DEVICE">DEVICE</a>
See <a href="#CL-OUT123:CONNECTED">CONNECTED</a></pre></div> </article> </li><li> <a name="CL-OUT123:DEVICE-DEFAULT-NAME"> </a> <article id="FUNCTION CL-OUT123:DEVICE-DEFAULT-NAME"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ADEVICE-DEFAULT-NAME">DEVICE-DEFAULT-NAME</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&amp;OPTIONAL (IDENT (PACKAGE-NAME *PACKAGE*))</code><code>)</code> </header> <div class="docstring"><pre>Attempts to return a somewhat sensible name to use for our application.</pre></div> </article> </li><li> <a name="CL-OUT123:DISCONNECT"> </a> <article id="FUNCTION CL-OUT123:DISCONNECT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ADISCONNECT">DISCONNECT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Disconnects the output from its driver and device.
If the output is already disconnected, this does nothing.
If there is still audio data to be played on the buffer, then this
will block until it is finished. If you wish to abort immediately,
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
call DROP first.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:DROP">DROP</a>
See <a href="#CL-OUT123:CONNECTED">CONNECTED</a></pre></div> </article> </li><li> <a name="CL-OUT123:DRAIN"> </a> <article id="FUNCTION CL-OUT123:DRAIN"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ADRAIN">DRAIN</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Blocks until all output in the buffer has been played back.
Implicitly resumes playback if it is paused first and then
pauses it again once it finishes.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:PLAYING">PLAYING</a>
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:NDRAIN">NDRAIN</a></pre></div> </article> </li><li> <a name="CL-OUT123:DRIVER-INFO"> </a> <article id="FUNCTION CL-OUT123:DRIVER-INFO"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ADRIVER-INFO">DRIVER-INFO</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Returns the current driver and device the output uses, if any.
This might differ from DRIVER and DEVICE if the handle was not yet
CONNECTed, was connected by non-standard means, or something else
went wrong.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:CONNECT">CONNECT</a></pre></div> </article> </li><li> <a name="CL-OUT123:DRIVERS"> </a> <article id="FUNCTION CL-OUT123:DRIVERS"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ADRIVERS">DRIVERS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Returns a list of drivers with their name and description.
You can use this to determine the available drivers and pick a suitable backend based on that.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:DROP"> </a> <article id="FUNCTION CL-OUT123:DROP"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ADROP">DROP</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Drops all remaining output from the internal buffers.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:ENCODINGS"> </a> <article id="FUNCTION CL-OUT123:ENCODINGS"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3AENCODINGS">ENCODINGS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT RATE CHANNELS</code><code>)</code> </header> <div class="docstring"><pre>Returns a list of the possible encodings for the output rate and channel count you specified.
The output must be connected and will be stopped if it is playing.
See <a href="NIL">OTUPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:FORMATS"> </a> <article id="FUNCTION CL-OUT123:FORMATS"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3AFORMATS">FORMATS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT RATES MIN-CHANNELS MAX-CHANNELS</code><code>)</code> </header> <div class="docstring"><pre>Returns a list of possible formats for the requested rates and channels.
RATES should be a list of integers.
The output must be connected and will be stopped if it is playing.
Each item in the list is a plist with :RATE, :CHANNELS, and :ENCODINGS as keys.</pre></div> </article> </li><li> <a name="CL-OUT123:MAKE-OUTPUT"> </a> <article id="FUNCTION CL-OUT123:MAKE-OUTPUT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3AMAKE-OUTPUT">MAKE-OUTPUT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">DRIVER &amp;REST ARGS &amp;KEY &amp;ALLOW-OTHER-KEYS</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123:NDRAIN"> </a> <article id="FUNCTION CL-OUT123:NDRAIN"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ANDRAIN">NDRAIN</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT BYTES</code><code>)</code> </header> <div class="docstring"><pre>Blocks until either all or bytes number of bytes have been played back.
Implictly resumes playback if it is paused first and then
pauses it again if there are no remaining bytes to be played
back.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:PLAYING">PLAYING</a>
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:DRAIN">DRAIN</a></pre></div> </article> </li><li> <a name="CL-OUT123:PAUSE"> </a> <article id="FUNCTION CL-OUT123:PAUSE"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3APAUSE">PAUSE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Pauses playback.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:PLAYING">PLAYING</a></pre></div> </article> </li><li> <a name="CL-OUT123:PLAY"> </a> <article id="FUNCTION CL-OUT123:PLAY"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3APLAY">PLAY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT BYTES &amp;OPTIONAL (COUNT (LENGTH BYTES))</code><code>)</code> </header> <div class="docstring"><pre>Send the octet-vector or array-pointer to out123 to be played back on the output.
If you need low latency, then this is definitely not the
function for you. The buffer is converted into a foreign
byte array before being sent off.
Returns the number of bytes that were actually played back.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:PLAY-DIRECTLY">PLAY-DIRECTLY</a>
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:PLAY-DIRECTLY"> </a> <article id="FUNCTION CL-OUT123:PLAY-DIRECTLY"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3APLAY-DIRECTLY">PLAY-DIRECTLY</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT BUFFER BYTES</code><code>)</code> </header> <div class="docstring"><pre>Directly sends the given buffer to out123 to be played back on the output.
BUFFER must be a pointer to a foreign byte array of at least
BYTES size. Returns the number of bytes that were actually
played back.
This does not catch errors. If you need to check for errors,
see CL-OUT123-CFFI:ERRCODE.
This does not care for synchronisation or mutual exclusion.
If you call this simultaneously from multiple threads, things
/will/ crash and burn horribly.
See <a href="#CL-OUT123-CFFI:ERRCODE">CL-OUT123-CFFI:ERRCODE</a>
See <a href="#CL-OUT123-CFFI:HANDLE">HANDLE</a>
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:PLAYBACK-FORMAT"> </a> <article id="FUNCTION CL-OUT123:PLAYBACK-FORMAT"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3APLAYBACK-FORMAT">PLAYBACK-FORMAT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Returns the current rate, channels, encoding, and framesize used by the output, if any.
This might differ from RATE, CHANNELS, ENCODING, and FRAMESIZE
if the handle has not yet been STARTed, was started by
non-standard means, or something else went wrong.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:START">START</a></pre></div> </article> </li><li> <a name="CL-OUT123:RESUME"> </a> <article id="FUNCTION CL-OUT123:RESUME"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ARESUME">RESUME</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Resumes playback.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:PLAYING">PLAYING</a></pre></div> </article> </li><li> <a name="CL-OUT123:START"> </a> <article id="FUNCTION CL-OUT123:START"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ASTART">START</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT &amp;KEY (RATE (RATE OUTPUT)) (CHANNELS (CHANNELS OUTPUT))
(ENCODING (ENCODING OUTPUT))</code><code>)</code> </header> <div class="docstring"><pre>Starts playback to the connected output.
The output must be connected and must not have been started before.
If the start was successful, the output's RATE, CHANNELS, ENCODING,
and FRAMESIZE are updated to reflect the values that were actually
chosen by the backend. This might differ from what you requested.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:RATE">RATE</a>
See <a href="#CL-OUT123:CHANNELS">CHANNELS</a>
See <a href="#CL-OUT123:ENCODING">ENCODING</a>
See <a href="NIL">FRAMESIZE</a>
See <a href="#CL-OUT123:PLAYING">PLAYING</a></pre></div> </article> </li><li> <a name="CL-OUT123:STOP"> </a> <article id="FUNCTION CL-OUT123:STOP"> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#FUNCTION%20CL-OUT123%3ASTOP">STOP</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OUTPUT</code><code>)</code> </header> <div class="docstring"><pre>Stops playback.
If there is still audio data to be played on the buffer, then this
will block until it is finished. If you wish to abort immediately,
call DROP first.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:PLAYING">PLAYING</a></pre></div> </article> </li><li> <a name="CL-OUT123:BYTES"> </a> <article id="GENERIC CL-OUT123:BYTES"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ABYTES">BYTES</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><i>No docstring provided.</i></div> </article> </li><li> <a name="CL-OUT123:CHANNELS"> </a> <article id="GENERIC CL-OUT123:CHANNELS"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ACHANNELS">CHANNELS</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><pre>Returns the number of audio channels the backend uses to process the buffer data.
Can be set as an initarg on the output.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:START">START</a></pre></div> </article> </li><li> <a name="CL-OUT123:CONNECTED"> </a> <article id="GENERIC CL-OUT123:CONNECTED"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ACONNECTED">CONNECTED</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns T if the output is connected to a device.</pre></div> </article> </li><li> <a name="CL-OUT123:DEVICE"> </a> <article id="GENERIC CL-OUT123:DEVICE"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ADEVICE">DEVICE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><pre>Returns the string naming the device used to play back sound or NIL if unknown.
Can be set as an initarg on the output.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:CONNECT">CONNECT</a></pre></div> </article> </li><li> <a name="CL-OUT123:DEVICE-BUFFER"> </a> <article id="GENERIC CL-OUT123:DEVICE-BUFFER"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ADEVICE-BUFFER">DEVICE-BUFFER</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns the number of seconds that the device buffer should hold.
Can be set as an initarg on the output.
Allowed values are:
T for the default that the backend will choose for itself.
REAL for the approximate amount of seconds of buffering. Should
not be more than 0.5.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:DRIVER"> </a> <article id="GENERIC CL-OUT123:DRIVER"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ADRIVER">DRIVER</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><pre>Returns the string naming the driver used to play back sound or NIL if unknown.
Can be set as an initarg on the output.
In order to get a listing of all possible drivers, see DRIVERS.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:DRIVERS">DRIVERS</a>
See <a href="#CL-OUT123:CONNECT">CONNECT</a></pre></div> </article> </li><li> <a name="CL-OUT123:ENCODING"> </a> <article id="GENERIC CL-OUT123:ENCODING"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3AENCODING">ENCODING</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><pre>Returns the encoding the backend uses to decode the buffer data.
Can be set as an initarg on the output.
See <a href="#CL-OUT123-CFFI:ENCODINGS">ENCODINGS</a> for a list of possible encodings.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:START">START</a>
See <a href="#CL-OUT123-CFFI:ENCODINGS">ENCODINGS</a></pre></div> </article> </li><li> <a name="CL-OUT123:ERROR-STRING"> </a> <article id="GENERIC CL-OUT123:ERROR-STRING"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3AERROR-STRING">ERROR-STRING</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><pre>Returns the error string from the out123 library for the error we encountered.
See <a href="#CL-OUT123:ERROR-STRING-ERROR">ERROR-STRING-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:GAIN"> </a> <article id="GENERIC CL-OUT123:GAIN"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3AGAIN">GAIN</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns an integer representing the output device gain. This is driver-specific.
Can be set as an initarg on the output.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:HANDLE"> </a> <article id="GENERIC CL-OUT123:HANDLE"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3AHANDLE">HANDLE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns the pointer to the actual handle object that the output object encapsulates.
You should not need this unless you are working with the internals of the library.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:NAME"> </a> <article id="GENERIC CL-OUT123:NAME"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ANAME">NAME</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns the name used to identify the output in the audio playback device, if permitted.
Can be set as an initarg on the otuput.
The default value is calculated by DEVICE-DEFAULT-NAME
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123:DEVICE-DEFAULT-NAME">DEVICE-DEFAULT-NAME</a></pre></div> </article> </li><li> <a name="CL-OUT123:OUTPUT"> </a> <article id="GENERIC CL-OUT123:OUTPUT"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3AOUTPUT">OUTPUT</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><pre>Returns the output object associated with the condition.
See <a href="#CL-OUT123:OUTPUT-ERROR">OUTPUT-ERROR</a></pre></div> </article> </li><li> <a name="CL-OUT123:OUTPUT-TO"> </a> <article id="GENERIC CL-OUT123:OUTPUT-TO"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3AOUTPUT-TO">OUTPUT-TO</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns a list of special flags that tell the backend (if possible) where to output to.
Can be set as an initarg on the output.
The flags in the list can be one of :HEADPHONES :INTERNAL-SPEAKER :LINE-OUT
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:PLAYING"> </a> <article id="GENERIC CL-OUT123:PLAYING"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3APLAYING">PLAYING</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns T if the output is currently playing audio.</pre></div> </article> </li><li> <a name="CL-OUT123:PRELOAD"> </a> <article id="GENERIC CL-OUT123:PRELOAD"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3APRELOAD">PRELOAD</a></code></h4> <code class="qualifiers"></code> <code class="arguments">OBJECT</code><code>)</code> </header> <div class="docstring"><pre>Returns the percentage of data that is preloaded into the device buffer.
Can be set as an initarg on the output.
Allowed values are:
T for the default that the backend will choose for itself.
NIL for no preloading, aka 0.0.
REAL for the approximate fraction that should be preloaded [0,1].
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a></pre></div> </article> </li><li> <a name="CL-OUT123:RATE"> </a> <article id="GENERIC CL-OUT123:RATE"> <header class="generic"> <span class="type">generic</span> <code>(</code><h4 class="name"><code><a href="#GENERIC%20CL-OUT123%3ARATE">RATE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CONDITION</code><code>)</code> </header> <div class="docstring"><pre>Returns the sampling rate the backend uses to process the buffer data.
Can be set as an initarg on the output.
See <a href="#CL-OUT123:OUTPUT">OUTPUT</a>
See <a href="#CL-OUT123-CFFI:START">START</a></pre></div> </article> </li><li> <a name="CL-OUT123:WITH-PLAYBACK"> </a> <article id="MACRO CL-OUT123:WITH-PLAYBACK"> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#MACRO%20CL-OUT123%3AWITH-PLAYBACK">WITH-PLAYBACK</a></code></h4> <code class="qualifiers"></code> <code class="arguments">(OUTPUT &amp;KEY (RATE) (CHANNELS) (ENCODING)) &amp;BODY BODY</code><code>)</code> </header> <div class="docstring"><pre>Ensures a clean playback environment for the body.
First calls START with the given options, then evaluates the body
forms in an unwind-protect that calls STOP on exit.
See <a href="#CL-OUT123-CFFI:START">START</a>
See <a href="#CL-OUT123-CFFI:STOP">STOP</a></pre></div> </article> </li></ul> </li></ul> </article> </main> </body> </html>