Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8f1462e52e1797a02c97073eed0b7f92 > files > 650

python-docs-2.6.5-2.5mdv2010.2.i586.rpm

<!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="Content-Type" content="text/html; charset=utf-8" />
    
    <title>39.1. al — Audio functions on the SGI &mdash; Python v2.6.5 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.6.5',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python v2.6.5 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python v2.6.5 documentation" href="../index.html" />
    <link rel="up" title="39. SGI IRIX Specific Services" href="sgi.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" />
 

  </head>
  <body>
    <div class="related">
      <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="../modindex.html" title="Global Module Index"
             accesskey="M">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="../index.html">Python v2.6.5 documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="sgi.html" accesskey="U">39. SGI IRIX Specific Services</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-al">
<h1>39.1. <tt class="xref docutils literal"><span class="pre">al</span></tt> &#8212; Audio functions on the SGI<a class="headerlink" href="#module-al" title="Permalink to this headline">¶</a></h1>
<p><em>Platforms: </em>IRIX</p>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 2.6: </span>The <tt class="xref docutils literal"><span class="pre">al</span></tt> module has been deprecated for removal in Python 3.0.</p>
<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&#8217;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 <tt class="docutils literal"><span class="pre">AL</span></tt> prefixed to their name.</p>
<p id="index-214">Symbolic constants from the C header file <tt class="docutils literal"><span class="pre">&lt;audio.h&gt;</span></tt> are defined in the
standard module <tt class="xref docutils literal"><span class="pre">AL</span></tt>, 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 &#8212; there is no
documented upper limit.)</p>
</div>
<p>The module defines the following functions:</p>
<dl class="function">
<dt id="al.openport">
<tt class="descclassname">al.</tt><tt class="descname">openport</tt><big>(</big><em>name</em>, <em>direction</em><span class="optional">[</span>, <em>config</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#al.openport" title="Permalink to this definition">¶</a></dt>
<dd>The name and direction arguments are strings.  The optional <em>config</em> argument is
a configuration object as returned by <a title="al.newconfig" class="reference internal" href="#al.newconfig"><tt class="xref docutils literal"><span class="pre">newconfig()</span></tt></a>.  The return value is an
<em>audio port object</em>; methods of audio port objects are described below.</dd></dl>

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

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

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

<dl class="function">
<dt id="al.setparams">
<tt class="descclassname">al.</tt><tt class="descname">setparams</tt><big>(</big><em>device</em>, <em>list</em><big>)</big><a class="headerlink" href="#al.setparams" title="Permalink to this definition">¶</a></dt>
<dd>The <em>device</em> argument is an integer.  The <em>list</em> argument is a list such as
returned by <a title="al.queryparams" class="reference internal" href="#al.queryparams"><tt class="xref docutils literal"><span class="pre">queryparams()</span></tt></a>.</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 title="al.newconfig" class="reference internal" href="#al.newconfig"><tt class="xref docutils literal"><span class="pre">newconfig()</span></tt></a> have the following methods:</p>
<dl class="method">
<dt>
<tt class="descname">audio configuration.getqueuesize()</tt></dt>
<dd>Return the queue size.</dd></dl>

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

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

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

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

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

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

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

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

<dl class="method">
<dt>
<tt class="descname">audio configuration.setfloatmax(floatmax)</tt></dt>
<dd>Set the maximum value for floating sample formats.</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 title="al.openport" class="reference internal" href="#al.openport"><tt class="xref docutils literal"><span class="pre">openport()</span></tt></a>, have the following methods:</p>
<dl class="method">
<dt>
<tt class="descname">audio port.closeport()</tt></dt>
<dd>Close the port.</dd></dl>

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

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

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

<dl class="method">
<dt>
<tt class="descname">audio port.readsamps(nsamples)</tt></dt>
<dd>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).</dd></dl>

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

<dl class="method">
<dt>
<tt class="descname">audio port.getfillpoint()</tt></dt>
<dd>Return the &#8216;fill point&#8217;.</dd></dl>

<dl class="method">
<dt>
<tt class="descname">audio port.setfillpoint(fillpoint)</tt></dt>
<dd>Set the &#8216;fill point&#8217;.</dd></dl>

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

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

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

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


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="../contents.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="#">39.1. <tt class="docutils literal"><span class="pre">al</span></tt> &#8212; Audio functions on the SGI</a><ul>
<li><a class="reference external" href="#configuration-objects">39.1.1. Configuration Objects</a></li>
<li><a class="reference external" href="#port-objects">39.1.2. Port Objects</a></li>
</ul>
</li>
<li><a class="reference external" href="#module-AL">39.2. <tt class="docutils literal"><span class="pre">AL</span></tt> &#8212; Constants used with the <tt class="docutils literal"><span class="pre">al</span></tt> 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. <tt class="docutils literal"><span class="pre">cd</span></tt> &#8212; CD-ROM access on SGI systems</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/library/al.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <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="../modindex.html" title="Global 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="../index.html">Python v2.6.5 documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="sgi.html" >39. SGI IRIX Specific Services</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2010, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.  
    <a href="http://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Mar 19, 2010.
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
    </div>

  </body>
</html>