Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > e1011ddec34cda34f3a002b121247943 > files > 679

python-docs-2.7.17-1.1.mga7.noarch.rpm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>39.1. al — Audio functions on the SGI &#8212; Python 2.7.17 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 2.7.17 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="next" title="39.3. cd — CD-ROM access on SGI systems" href="cd.html" />
    <link rel="prev" title="39. SGI IRIX Specific Services" href="sgi.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <link rel="canonical" href="https://docs.python.org/2/library/al.html" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
 
    

  </head><body>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="cd.html" title="39.3. cd — CD-ROM access on SGI systems"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="sgi.html" title="39. SGI IRIX Specific Services"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="sgi.html" accesskey="U">39. SGI IRIX Specific Services</a> &#187;</li> 
      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-al">
<span id="al-audio-functions-on-the-sgi"></span><h1>39.1. <a class="reference internal" href="#module-al" title="al: Audio functions on the SGI. (deprecated) (IRIX)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">al</span></code></a> — Audio functions on the SGI<a class="headerlink" href="#module-al" title="Permalink to this headline">¶</a></h1>
<div class="deprecated">
<p><span class="versionmodified deprecated">Deprecated since version 2.6: </span>The <a class="reference internal" href="#module-al" title="al: Audio functions on the SGI. (deprecated) (IRIX)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">al</span></code></a> module has been removed in Python 3.</p>
</div>
<p>This module provides access to the audio facilities of the SGI Indy and Indigo
workstations.  See section 3A of the IRIX man pages for details.  You’ll need to
read those man pages to understand what these functions do!  Some of the
functions are not available in IRIX releases before 4.0.5.  Again, see the
manual to check whether a specific function is available on your platform.</p>
<p>All functions and methods defined in this module are equivalent to the C
functions with <code class="docutils literal notranslate"><span class="pre">AL</span></code> prefixed to their name.</p>
<p id="index-0">Symbolic constants from the C header file <code class="docutils literal notranslate"><span class="pre">&lt;audio.h&gt;</span></code> are defined in the
standard module <a class="reference internal" href="#module-AL" title="AL: Constants used with the al module. (deprecated) (IRIX)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">AL</span></code></a>, see below.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The current version of the audio library may dump core when bad argument values
are passed rather than returning an error status.  Unfortunately, since the
precise circumstances under which this may happen are undocumented and hard to
check, the Python interface can provide no protection against this kind of
problems. (One example is specifying an excessive queue size — there is no
documented upper limit.)</p>
</div>
<p>The module defines the following functions:</p>
<dl class="function">
<dt id="al.openport">
<code class="descclassname">al.</code><code class="descname">openport</code><span class="sig-paren">(</span><em>name</em>, <em>direction</em><span class="optional">[</span>, <em>config</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#al.openport" title="Permalink to this definition">¶</a></dt>
<dd><p>The name and direction arguments are strings.  The optional <em>config</em> argument is
a configuration object as returned by <a class="reference internal" href="#al.newconfig" title="al.newconfig"><code class="xref py py-func docutils literal notranslate"><span class="pre">newconfig()</span></code></a>.  The return value is an
<em class="dfn">audio port object</em>; methods of audio port objects are described below.</p>
</dd></dl>

<dl class="function">
<dt id="al.newconfig">
<code class="descclassname">al.</code><code class="descname">newconfig</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#al.newconfig" title="Permalink to this definition">¶</a></dt>
<dd><p>The return value is a new <em class="dfn">audio configuration object</em>; methods of audio
configuration objects are described below.</p>
</dd></dl>

<dl class="function">
<dt id="al.queryparams">
<code class="descclassname">al.</code><code class="descname">queryparams</code><span class="sig-paren">(</span><em>device</em><span class="sig-paren">)</span><a class="headerlink" href="#al.queryparams" title="Permalink to this definition">¶</a></dt>
<dd><p>The device argument is an integer.  The return value is a list of integers
containing the data returned by <code class="xref c c-func docutils literal notranslate"><span class="pre">ALqueryparams()</span></code>.</p>
</dd></dl>

<dl class="function">
<dt id="al.getparams">
<code class="descclassname">al.</code><code class="descname">getparams</code><span class="sig-paren">(</span><em>device</em>, <em>list</em><span class="sig-paren">)</span><a class="headerlink" href="#al.getparams" title="Permalink to this definition">¶</a></dt>
<dd><p>The <em>device</em> argument is an integer.  The list argument is a list such as
returned by <a class="reference internal" href="#al.queryparams" title="al.queryparams"><code class="xref py py-func docutils literal notranslate"><span class="pre">queryparams()</span></code></a>; it is modified in place (!).</p>
</dd></dl>

<dl class="function">
<dt id="al.setparams">
<code class="descclassname">al.</code><code class="descname">setparams</code><span class="sig-paren">(</span><em>device</em>, <em>list</em><span class="sig-paren">)</span><a class="headerlink" href="#al.setparams" title="Permalink to this definition">¶</a></dt>
<dd><p>The <em>device</em> argument is an integer.  The <em>list</em> argument is a list such as
returned by <a class="reference internal" href="#al.queryparams" title="al.queryparams"><code class="xref py py-func docutils literal notranslate"><span class="pre">queryparams()</span></code></a>.</p>
</dd></dl>

<div class="section" id="configuration-objects">
<span id="al-config-objects"></span><h2>39.1.1. Configuration Objects<a class="headerlink" href="#configuration-objects" title="Permalink to this headline">¶</a></h2>
<p>Configuration objects returned by <a class="reference internal" href="#al.newconfig" title="al.newconfig"><code class="xref py py-func docutils literal notranslate"><span class="pre">newconfig()</span></code></a> have the following methods:</p>
<dl class="method">
<dt>
<code class="descname">audio configuration.getqueuesize()</code></dt>
<dd><p>Return the queue size.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.setqueuesize(size)</code></dt>
<dd><p>Set the queue size.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.getwidth()</code></dt>
<dd><p>Get the sample width.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.setwidth(width)</code></dt>
<dd><p>Set the sample width.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.getchannels()</code></dt>
<dd><p>Get the channel count.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.setchannels(nchannels)</code></dt>
<dd><p>Set the channel count.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.getsampfmt()</code></dt>
<dd><p>Get the sample format.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.setsampfmt(sampfmt)</code></dt>
<dd><p>Set the sample format.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.getfloatmax()</code></dt>
<dd><p>Get the maximum value for floating sample formats.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio configuration.setfloatmax(floatmax)</code></dt>
<dd><p>Set the maximum value for floating sample formats.</p>
</dd></dl>

</div>
<div class="section" id="port-objects">
<span id="al-port-objects"></span><h2>39.1.2. Port Objects<a class="headerlink" href="#port-objects" title="Permalink to this headline">¶</a></h2>
<p>Port objects, as returned by <a class="reference internal" href="#al.openport" title="al.openport"><code class="xref py py-func docutils literal notranslate"><span class="pre">openport()</span></code></a>, have the following methods:</p>
<dl class="method">
<dt>
<code class="descname">audio port.closeport()</code></dt>
<dd><p>Close the port.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.getfd()</code></dt>
<dd><p>Return the file descriptor as an int.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.getfilled()</code></dt>
<dd><p>Return the number of filled samples.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.getfillable()</code></dt>
<dd><p>Return the number of fillable samples.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.readsamps(nsamples)</code></dt>
<dd><p>Read a number of samples from the queue, blocking if necessary. Return the data
as a string containing the raw data, (e.g., 2 bytes per sample in big-endian
byte order (high byte, low byte) if you have set the sample width to 2 bytes).</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.writesamps(samples)</code></dt>
<dd><p>Write samples into the queue, blocking if necessary.  The samples are encoded as
described for the <code class="xref py py-meth docutils literal notranslate"><span class="pre">readsamps()</span></code> return value.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.getfillpoint()</code></dt>
<dd><p>Return the ‘fill point’.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.setfillpoint(fillpoint)</code></dt>
<dd><p>Set the ‘fill point’.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.getconfig()</code></dt>
<dd><p>Return a configuration object containing the current configuration of the port.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.setconfig(config)</code></dt>
<dd><p>Set the configuration from the argument, a configuration object.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descname">audio port.getstatus(list)</code></dt>
<dd><p>Get status information on last error.</p>
</dd></dl>

</div>
</div>
<div class="section" id="module-AL">
<span id="al-constants-used-with-the-al-module"></span><h1>39.2. <a class="reference internal" href="#module-AL" title="AL: Constants used with the al module. (deprecated) (IRIX)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">AL</span></code></a> — Constants used with the <a class="reference internal" href="#module-al" title="al: Audio functions on the SGI. (deprecated) (IRIX)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">al</span></code></a> module<a class="headerlink" href="#module-AL" title="Permalink to this headline">¶</a></h1>
<div class="deprecated">
<p><span class="versionmodified deprecated">Deprecated since version 2.6: </span>The <a class="reference internal" href="#module-AL" title="AL: Constants used with the al module. (deprecated) (IRIX)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">AL</span></code></a> module has been removed in Python 3.</p>
</div>
<p>This module defines symbolic constants needed to use the built-in module
<a class="reference internal" href="#module-al" title="al: Audio functions on the SGI. (deprecated) (IRIX)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">al</span></code></a> (see above); they are equivalent to those defined in the C header file
<code class="docutils literal notranslate"><span class="pre">&lt;audio.h&gt;</span></code> except that the name prefix <code class="docutils literal notranslate"><span class="pre">AL_</span></code> is omitted.  Read the module
source for a complete list of the defined names.  Suggested use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">al</span>
<span class="kn">from</span> <span class="nn">AL</span> <span class="k">import</span> <span class="o">*</span>
</pre></div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">39.1. <code class="xref py py-mod docutils literal notranslate"><span class="pre">al</span></code> — Audio functions on the SGI</a><ul>
<li><a class="reference internal" href="#configuration-objects">39.1.1. Configuration Objects</a></li>
<li><a class="reference internal" href="#port-objects">39.1.2. Port Objects</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-AL">39.2. <code class="xref py py-mod docutils literal notranslate"><span class="pre">AL</span></code> — Constants used with the <code class="xref py py-mod docutils literal notranslate"><span class="pre">al</span></code> module</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="sgi.html"
                        title="previous chapter">39. SGI IRIX Specific Services</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="cd.html"
                        title="next chapter">39.3. <code class="xref py py-mod docutils literal notranslate"><span class="pre">cd</span></code> — CD-ROM access on SGI systems</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/library/al.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="cd.html" title="39.3. cd — CD-ROM access on SGI systems"
             >next</a> |</li>
        <li class="right" >
          <a href="sgi.html" title="39. SGI IRIX Specific Services"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">Python 2.7.17 documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="sgi.html" >39. SGI IRIX Specific Services</a> &#187;</li> 
      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2019, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Oct 19, 2019.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.0.1.
    </div>

  </body>
</html>