X7ROOT File Manager
Current Path:
/usr/share/doc/python-docs-2.7.5/html/library
usr
/
share
/
doc
/
python-docs-2.7.5
/
html
/
library
/
π
..
π
2to3.html
(49.27 KB)
π
__builtin__.html
(10.26 KB)
π
__future__.html
(13.79 KB)
π
__main__.html
(7.05 KB)
π
_winreg.html
(59.21 KB)
π
abc.html
(23.9 KB)
π
aepack.html
(13.16 KB)
π
aetools.html
(14.91 KB)
π
aetypes.html
(18.88 KB)
π
aifc.html
(22.4 KB)
π
al.html
(17.34 KB)
π
allos.html
(33.72 KB)
π
anydbm.html
(16.33 KB)
π
archiving.html
(9.26 KB)
π
argparse.html
(237.62 KB)
π
array.html
(29.29 KB)
π
ast.html
(34.98 KB)
π
asynchat.html
(31.43 KB)
π
asyncore.html
(36.51 KB)
π
atexit.html
(16.8 KB)
π
audioop.html
(31.36 KB)
π
autogil.html
(8.19 KB)
π
base64.html
(19.67 KB)
π
basehttpserver.html
(34.04 KB)
π
bastion.html
(11.04 KB)
π
bdb.html
(36.68 KB)
π
binascii.html
(20.67 KB)
π
binhex.html
(10.58 KB)
π
bisect.html
(23.24 KB)
π
bsddb.html
(26.43 KB)
π
bz2.html
(26.08 KB)
π
calendar.html
(37.79 KB)
π
carbon.html
(48.94 KB)
π
cd.html
(27.96 KB)
π
cgi.html
(49.92 KB)
π
cgihttpserver.html
(13.1 KB)
π
cgitb.html
(11.41 KB)
π
chunk.html
(14.66 KB)
π
cmath.html
(25.63 KB)
π
cmd.html
(26.09 KB)
π
code.html
(24.58 KB)
π
codecs.html
(100.64 KB)
π
codeop.html
(14.84 KB)
π
collections.html
(133.96 KB)
π
colorpicker.html
(7.52 KB)
π
colorsys.html
(11.04 KB)
π
commands.html
(14.36 KB)
π
compileall.html
(16.83 KB)
π
compiler.html
(67.75 KB)
π
configparser.html
(62.13 KB)
π
constants.html
(12.83 KB)
π
contextlib.html
(19.39 KB)
π
cookie.html
(39.07 KB)
π
cookielib.html
(83.82 KB)
π
copy.html
(12.19 KB)
π
copy_reg.html
(13.76 KB)
π
crypt.html
(10.04 KB)
π
crypto.html
(7.59 KB)
π
csv.html
(67.37 KB)
π
ctypes.html
(238.78 KB)
π
curses.ascii.html
(22.29 KB)
π
curses.html
(146.63 KB)
π
curses.panel.html
(14.39 KB)
π
custominterp.html
(7.62 KB)
π
datatypes.html
(16.84 KB)
π
datetime.html
(226.59 KB)
π
dbhash.html
(15.48 KB)
π
dbm.html
(12.07 KB)
π
debug.html
(10.15 KB)
π
decimal.html
(194.44 KB)
π
development.html
(14.17 KB)
π
difflib.html
(84.83 KB)
π
dircache.html
(11.41 KB)
π
dis.html
(69.95 KB)
π
distutils.html
(8.05 KB)
π
dl.html
(16.33 KB)
π
doctest.html
(165.54 KB)
π
docxmlrpcserver.html
(16.43 KB)
π
dumbdbm.html
(14.02 KB)
π
dummy_thread.html
(9.43 KB)
π
dummy_threading.html
(8.37 KB)
π
easydialogs.html
(30.55 KB)
π
email-examples.html
(45.65 KB)
π
email.charset.html
(26.8 KB)
π
email.encoders.html
(11.86 KB)
π
email.errors.html
(15.77 KB)
π
email.generator.html
(20.77 KB)
π
email.header.html
(26.92 KB)
π
email.html
(44.24 KB)
π
email.iterators.html
(11.52 KB)
π
email.message.html
(63.16 KB)
π
email.mime.html
(27.93 KB)
π
email.parser.html
(30.45 KB)
π
email.util.html
(24.46 KB)
π
errno.html
(37.99 KB)
π
exceptions.html
(56.13 KB)
π
fcntl.html
(22.67 KB)
π
filecmp.html
(22.3 KB)
π
fileformats.html
(9.14 KB)
π
fileinput.html
(24.28 KB)
π
filesys.html
(10.2 KB)
π
fl.html
(49.92 KB)
π
fm.html
(11.91 KB)
π
fnmatch.html
(14.58 KB)
π
formatter.html
(34.06 KB)
π
fpectl.html
(16.01 KB)
π
fpformat.html
(10.59 KB)
π
fractions.html
(22.61 KB)
π
framework.html
(33.34 KB)
π
frameworks.html
(7.14 KB)
π
ftplib.html
(43.99 KB)
π
functions.html
(183.14 KB)
π
functools.html
(27.17 KB)
π
future_builtins.html
(13.04 KB)
π
gc.html
(25.75 KB)
π
gdbm.html
(15.96 KB)
π
gensuitemodule.html
(11.51 KB)
π
getopt.html
(23.66 KB)
π
getpass.html
(10.65 KB)
π
gettext.html
(78.76 KB)
π
gl.html
(22.09 KB)
π
glob.html
(13.26 KB)
π
grp.html
(10.49 KB)
π
gzip.html
(18.99 KB)
π
hashlib.html
(18.2 KB)
π
heapq.html
(31.61 KB)
π
hmac.html
(10.46 KB)
π
hotshot.html
(18.65 KB)
π
htmllib.html
(25.32 KB)
π
htmlparser.html
(39.11 KB)
π
httplib.html
(62.95 KB)
π
i18n.html
(9.52 KB)
π
ic.html
(17.17 KB)
π
idle.html
(20.9 KB)
π
imageop.html
(14.76 KB)
π
imaplib.html
(51.99 KB)
π
imgfile.html
(11.71 KB)
π
imghdr.html
(11.3 KB)
π
imp.html
(34.34 KB)
π
importlib.html
(8.26 KB)
π
imputil.html
(31.81 KB)
π
index.html
(72.78 KB)
π
inspect.html
(50.71 KB)
π
internet.html
(24.87 KB)
π
intro.html
(8.93 KB)
π
io.html
(98.13 KB)
π
ipc.html
(13.41 KB)
π
itertools.html
(115.91 KB)
π
jpeg.html
(12.74 KB)
π
json.html
(67.04 KB)
π
keyword.html
(7.68 KB)
π
language.html
(11.03 KB)
π
linecache.html
(10.59 KB)
π
locale.html
(55.14 KB)
π
logging.config.html
(63.36 KB)
π
logging.handlers.html
(69.64 KB)
π
logging.html
(95.64 KB)
π
mac.html
(21.79 KB)
π
macos.html
(14.76 KB)
π
macosa.html
(12.96 KB)
π
macostools.html
(15.52 KB)
π
macpath.html
(7.76 KB)
π
mailbox.html
(156.75 KB)
π
mailcap.html
(13.21 KB)
π
markup.html
(18.77 KB)
π
marshal.html
(17.98 KB)
π
math.html
(39.24 KB)
π
md5.html
(13.97 KB)
π
mhlib.html
(21.54 KB)
π
mimetools.html
(19.25 KB)
π
mimetypes.html
(28.39 KB)
π
mimewriter.html
(15.02 KB)
π
mimify.html
(13.36 KB)
π
miniaeframe.html
(12.2 KB)
π
misc.html
(6.87 KB)
π
mm.html
(9.03 KB)
π
mmap.html
(28.36 KB)
π
modulefinder.html
(15.31 KB)
π
modules.html
(8.46 KB)
π
msilib.html
(52.43 KB)
π
msvcrt.html
(19.37 KB)
π
multifile.html
(24.3 KB)
π
multiprocessing.html
(365.71 KB)
π
mutex.html
(11.23 KB)
π
netdata.html
(16.98 KB)
π
netrc.html
(12.3 KB)
π
new.html
(12.12 KB)
π
nis.html
(10.64 KB)
π
nntplib.html
(41.92 KB)
π
numbers.html
(37.75 KB)
π
numeric.html
(13.55 KB)
π
operator.html
(82 KB)
π
optparse.html
(222.56 KB)
π
os.html
(214.25 KB)
π
os.path.html
(38.34 KB)
π
ossaudiodev.html
(41.5 KB)
π
othergui.html
(9.08 KB)
π
parser.html
(39.36 KB)
π
pdb.html
(33.96 KB)
π
persistence.html
(14.87 KB)
π
pickle.html
(102.27 KB)
π
pickletools.html
(10.63 KB)
π
pipes.html
(18.01 KB)
π
pkgutil.html
(25.11 KB)
π
platform.html
(28.37 KB)
π
plistlib.html
(17.03 KB)
π
popen2.html
(25.43 KB)
π
poplib.html
(22.32 KB)
π
posix.html
(14.41 KB)
π
posixfile.html
(19.76 KB)
π
pprint.html
(29.92 KB)
π
profile.html
(63.56 KB)
π
pty.html
(9.48 KB)
π
pwd.html
(11.43 KB)
π
py_compile.html
(11.12 KB)
π
pyclbr.html
(14.71 KB)
π
pydoc.html
(11.48 KB)
π
pyexpat.html
(71.53 KB)
π
python.html
(12.27 KB)
π
queue.html
(24.22 KB)
π
quopri.html
(11.9 KB)
π
random.html
(37.83 KB)
π
re.html
(134.74 KB)
π
readline.html
(28.24 KB)
π
repr.html
(20.43 KB)
π
resource.html
(26.48 KB)
π
restricted.html
(11.65 KB)
π
rexec.html
(37.41 KB)
π
rfc822.html
(42.22 KB)
π
rlcompleter.html
(13.51 KB)
π
robotparser.html
(12.27 KB)
π
runpy.html
(19.34 KB)
π
sched.html
(18.54 KB)
π
scrolledtext.html
(9.32 KB)
π
select.html
(39.67 KB)
π
sets.html
(36.92 KB)
π
sgi.html
(9.71 KB)
π
sgmllib.html
(30.77 KB)
π
sha.html
(12.09 KB)
π
shelve.html
(27.02 KB)
π
shlex.html
(32.1 KB)
π
shutil.html
(40.22 KB)
π
signal.html
(31.14 KB)
π
simplehttpserver.html
(18.41 KB)
π
simplexmlrpcserver.html
(31.39 KB)
π
site.html
(23.64 KB)
π
smtpd.html
(12.46 KB)
π
smtplib.html
(42.13 KB)
π
sndhdr.html
(10.02 KB)
π
socket.html
(106.34 KB)
π
socketserver.html
(59.83 KB)
π
someos.html
(15.11 KB)
π
spwd.html
(10.33 KB)
π
sqlite3.html
(139.5 KB)
π
ssl.html
(65.62 KB)
π
stat.html
(32.31 KB)
π
statvfs.html
(10.6 KB)
π
stdtypes.html
(260.4 KB)
π
string.html
(106.65 KB)
π
stringio.html
(18.81 KB)
π
stringprep.html
(16.13 KB)
π
strings.html
(14.93 KB)
π
struct.html
(40.88 KB)
π
subprocess.html
(84.91 KB)
π
sun.html
(6.84 KB)
π
sunau.html
(27.1 KB)
π
sunaudio.html
(17.79 KB)
π
symbol.html
(7.66 KB)
π
symtable.html
(22.94 KB)
π
sys.html
(98.7 KB)
π
sysconfig.html
(23.84 KB)
π
syslog.html
(17.92 KB)
π
tabnanny.html
(10.63 KB)
π
tarfile.html
(78.68 KB)
π
telnetlib.html
(25.48 KB)
π
tempfile.html
(29.42 KB)
π
termios.html
(16.01 KB)
π
test.html
(52.62 KB)
π
textwrap.html
(27.25 KB)
π
thread.html
(20.47 KB)
π
threading.html
(76.69 KB)
π
time.html
(56.93 KB)
π
timeit.html
(36.27 KB)
π
tix.html
(46.96 KB)
π
tk.html
(23.64 KB)
π
tkinter.html
(67.67 KB)
π
token.html
(19.62 KB)
π
tokenize.html
(18.45 KB)
π
trace.html
(25.54 KB)
π
traceback.html
(33.44 KB)
π
ttk.html
(101.75 KB)
π
tty.html
(9.06 KB)
π
turtle.html
(211.74 KB)
π
types.html
(27.59 KB)
π
undoc.html
(23.16 KB)
π
unicodedata.html
(18.55 KB)
π
unittest.html
(202.85 KB)
π
unix.html
(10.55 KB)
π
urllib.html
(58.68 KB)
π
urllib2.html
(100.58 KB)
π
urlparse.html
(40.41 KB)
π
user.html
(11.83 KB)
π
userdict.html
(29.73 KB)
π
uu.html
(11.03 KB)
π
uuid.html
(28.19 KB)
π
warnings.html
(46.6 KB)
π
wave.html
(22.22 KB)
π
weakref.html
(36.52 KB)
π
webbrowser.html
(23.07 KB)
π
whichdb.html
(8.85 KB)
π
windows.html
(9.33 KB)
π
winsound.html
(18.75 KB)
π
wsgiref.html
(81.04 KB)
π
xdrlib.html
(29.94 KB)
π
xml.dom.html
(89.04 KB)
π
xml.dom.minidom.html
(40.42 KB)
π
xml.dom.pulldom.html
(12.71 KB)
π
xml.etree.elementtree.html
(93.22 KB)
π
xml.html
(16.49 KB)
π
xml.sax.handler.html
(38.63 KB)
π
xml.sax.html
(20.22 KB)
π
xml.sax.reader.html
(39.09 KB)
π
xml.sax.utils.html
(14.26 KB)
π
xmlrpclib.html
(60.79 KB)
π
zipfile.html
(53.14 KB)
π
zipimport.html
(20.42 KB)
π
zlib.html
(25.46 KB)
Editing: sunaudio.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="Content-Type" content="text/html; charset=utf-8" /> <title>39.1. sunaudiodev β Access to Sun audio hardware — Python 2.7.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.7.5', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </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.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 2.7.5 documentation" href="../index.html" /> <link rel="up" title="39. SunOS Specific Services" href="sun.html" /> <link rel="next" title="40. Undocumented Modules" href="undoc.html" /> <link rel="prev" title="39. SunOS Specific Services" href="sun.html" /> <link rel="shortcut icon" type="image/png" href="../_static/py.png" /> <script type="text/javascript" src="../_static/copybutton.js"></script> </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="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="undoc.html" title="40. Undocumented Modules" accesskey="N">next</a> |</li> <li class="right" > <a href="sun.html" title="39. SunOS 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="http://www.python.org/">Python</a> »</li> <li> <a href="../index.html">Python 2.7.5 documentation</a> » </li> <li><a href="index.html" >The Python Standard Library</a> »</li> <li><a href="sun.html" accesskey="U">39. SunOS Specific Services</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-sunaudiodev"> <span id="sunaudiodev-access-to-sun-audio-hardware"></span><h1>39.1. <a class="reference internal" href="#module-sunaudiodev" title="sunaudiodev: Access to Sun audio hardware. (deprecated) (SunOS)"><tt class="xref py py-mod docutils literal"><span class="pre">sunaudiodev</span></tt></a> — Access to Sun audio hardware<a class="headerlink" href="#module-sunaudiodev" title="Permalink to this headline">ΒΆ</a></h1> <p class="deprecated"> <span class="versionmodified">Deprecated since version 2.6: </span>The <a class="reference internal" href="#module-sunaudiodev" title="sunaudiodev: Access to Sun audio hardware. (deprecated) (SunOS)"><tt class="xref py py-mod docutils literal"><span class="pre">sunaudiodev</span></tt></a> module has been removed in Python 3.</p> <p id="index-0">This module allows you to access the Sun audio interface. The Sun audio hardware is capable of recording and playing back audio data in u-LAW format with a sample rate of 8K per second. A full description can be found in the <em class="manpage">audio(7I)</em> manual page.</p> <p id="index-1">The module <a class="reference internal" href="#module-SUNAUDIODEV" title="SUNAUDIODEV: Constants for use with sunaudiodev. (deprecated) (SunOS)"><tt class="xref py py-mod docutils literal"><span class="pre">SUNAUDIODEV</span></tt></a> defines constants which may be used with this module.</p> <p>This module defines the following variables and functions:</p> <dl class="exception"> <dt id="sunaudiodev.error"> <em class="property">exception </em><tt class="descclassname">sunaudiodev.</tt><tt class="descname">error</tt><a class="headerlink" href="#sunaudiodev.error" title="Permalink to this definition">ΒΆ</a></dt> <dd><p>This exception is raised on all errors. The argument is a string describing what went wrong.</p> </dd></dl> <dl class="function"> <dt id="sunaudiodev.open"> <tt class="descclassname">sunaudiodev.</tt><tt class="descname">open</tt><big>(</big><em>mode</em><big>)</big><a class="headerlink" href="#sunaudiodev.open" title="Permalink to this definition">ΒΆ</a></dt> <dd><p>This function opens the audio device and returns a Sun audio device object. This object can then be used to do I/O on. The <em>mode</em> parameter is one of <tt class="docutils literal"><span class="pre">'r'</span></tt> for record-only access, <tt class="docutils literal"><span class="pre">'w'</span></tt> for play-only access, <tt class="docutils literal"><span class="pre">'rw'</span></tt> for both and <tt class="docutils literal"><span class="pre">'control'</span></tt> for access to the control device. Since only one process is allowed to have the recorder or player open at the same time it is a good idea to open the device only for the activity needed. See <em class="manpage">audio(7I)</em> for details.</p> <p>As per the manpage, this module first looks in the environment variable <tt class="docutils literal"><span class="pre">AUDIODEV</span></tt> for the base audio device filename. If not found, it falls back to <tt class="file docutils literal"><span class="pre">/dev/audio</span></tt>. The control device is calculated by appending “ctl” to the base audio device.</p> </dd></dl> <div class="section" id="audio-device-objects"> <span id="id1"></span><h2>39.1.1. Audio Device Objects<a class="headerlink" href="#audio-device-objects" title="Permalink to this headline">ΒΆ</a></h2> <p>The audio device objects are returned by <a class="reference internal" href="#sunaudiodev.open" title="sunaudiodev.open"><tt class="xref py py-func docutils literal"><span class="pre">open()</span></tt></a> define the following methods (except <tt class="docutils literal"><span class="pre">control</span></tt> objects which only provide <tt class="xref py py-meth docutils literal"><span class="pre">getinfo()</span></tt>, <tt class="xref py py-meth docutils literal"><span class="pre">setinfo()</span></tt>, <tt class="xref py py-meth docutils literal"><span class="pre">fileno()</span></tt>, and <tt class="xref py py-meth docutils literal"><span class="pre">drain()</span></tt>):</p> <dl class="method"> <dt> <tt class="descname">audio device.close()</tt></dt> <dd><p>This method explicitly closes the device. It is useful in situations where deleting the object does not immediately close it since there are other references to it. A closed device should not be used again.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.fileno()</tt></dt> <dd><p>Returns the file descriptor associated with the device. This can be used to set up <tt class="docutils literal"><span class="pre">SIGPOLL</span></tt> notification, as described below.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.drain()</tt></dt> <dd><p>This method waits until all pending output is processed and then returns. Calling this method is often not necessary: destroying the object will automatically close the audio device and this will do an implicit drain.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.flush()</tt></dt> <dd><p>This method discards all pending output. It can be used avoid the slow response to a user’s stop request (due to buffering of up to one second of sound).</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.getinfo()</tt></dt> <dd><p>This method retrieves status information like input and output volume, etc. and returns it in the form of an audio status object. This object has no methods but it contains a number of attributes describing the current device status. The names and meanings of the attributes are described in <tt class="docutils literal"><span class="pre"><sun/audioio.h></span></tt> and in the <em class="manpage">audio(7I)</em> manual page. Member names are slightly different from their C counterparts: a status object is only a single structure. Members of the <tt class="xref c c-data docutils literal"><span class="pre">play</span></tt> substructure have <tt class="docutils literal"><span class="pre">o_</span></tt> prepended to their name and members of the <tt class="xref c c-data docutils literal"><span class="pre">record</span></tt> structure have <tt class="docutils literal"><span class="pre">i_</span></tt>. So, the C member <tt class="xref c c-data docutils literal"><span class="pre">play.sample_rate</span></tt> is accessed as <tt class="xref py py-attr docutils literal"><span class="pre">o_sample_rate</span></tt>, <tt class="xref c c-data docutils literal"><span class="pre">record.gain</span></tt> as <tt class="xref py py-attr docutils literal"><span class="pre">i_gain</span></tt> and <tt class="xref c c-data docutils literal"><span class="pre">monitor_gain</span></tt> plainly as <tt class="xref py py-attr docutils literal"><span class="pre">monitor_gain</span></tt>.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.ibufcount()</tt></dt> <dd><p>This method returns the number of samples that are buffered on the recording side, i.e. the program will not block on a <tt class="xref py py-func docutils literal"><span class="pre">read()</span></tt> call of so many samples.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.obufcount()</tt></dt> <dd><p>This method returns the number of samples buffered on the playback side. Unfortunately, this number cannot be used to determine a number of samples that can be written without blocking since the kernel output queue length seems to be variable.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.read(size)</tt></dt> <dd><p>This method reads <em>size</em> samples from the audio input and returns them as a Python string. The function blocks until enough data is available.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.setinfo(status)</tt></dt> <dd><p>This method sets the audio device status parameters. The <em>status</em> parameter is an device status object as returned by <tt class="xref py py-func docutils literal"><span class="pre">getinfo()</span></tt> and possibly modified by the program.</p> </dd></dl> <dl class="method"> <dt> <tt class="descname">audio device.write(samples)</tt></dt> <dd><p>Write is passed a Python string containing audio samples to be played. If there is enough buffer space free it will immediately return, otherwise it will block.</p> </dd></dl> <p>The audio device supports asynchronous notification of various events, through the SIGPOLL signal. Here’s an example of how you might enable this in Python:</p> <div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">handle_sigpoll</span><span class="p">(</span><span class="n">signum</span><span class="p">,</span> <span class="n">frame</span><span class="p">):</span> <span class="k">print</span> <span class="s">'I got a SIGPOLL update'</span> <span class="kn">import</span> <span class="nn">fcntl</span><span class="o">,</span> <span class="nn">signal</span><span class="o">,</span> <span class="nn">STROPTS</span> <span class="n">signal</span><span class="o">.</span><span class="n">signal</span><span class="p">(</span><span class="n">signal</span><span class="o">.</span><span class="n">SIGPOLL</span><span class="p">,</span> <span class="n">handle_sigpoll</span><span class="p">)</span> <span class="n">fcntl</span><span class="o">.</span><span class="n">ioctl</span><span class="p">(</span><span class="n">audio_obj</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">STROPTS</span><span class="o">.</span><span class="n">I_SETSIG</span><span class="p">,</span> <span class="n">STROPTS</span><span class="o">.</span><span class="n">S_MSG</span><span class="p">)</span> </pre></div> </div> </div> </div> <div class="section" id="module-SUNAUDIODEV"> <span id="sunaudiodev-constants-used-with-sunaudiodev"></span><h1>39.2. <a class="reference internal" href="#module-SUNAUDIODEV" title="SUNAUDIODEV: Constants for use with sunaudiodev. (deprecated) (SunOS)"><tt class="xref py py-mod docutils literal"><span class="pre">SUNAUDIODEV</span></tt></a> — Constants used with <a class="reference internal" href="#module-sunaudiodev" title="sunaudiodev: Access to Sun audio hardware. (deprecated) (SunOS)"><tt class="xref py py-mod docutils literal"><span class="pre">sunaudiodev</span></tt></a><a class="headerlink" href="#module-SUNAUDIODEV" title="Permalink to this headline">ΒΆ</a></h1> <p class="deprecated"> <span class="versionmodified">Deprecated since version 2.6: </span>The <a class="reference internal" href="#module-SUNAUDIODEV" title="SUNAUDIODEV: Constants for use with sunaudiodev. (deprecated) (SunOS)"><tt class="xref py py-mod docutils literal"><span class="pre">SUNAUDIODEV</span></tt></a> module has been removed in Python 3.</p> <p id="index-2">This is a companion module to <a class="reference internal" href="#module-sunaudiodev" title="sunaudiodev: Access to Sun audio hardware. (deprecated) (SunOS)"><tt class="xref py py-mod docutils literal"><span class="pre">sunaudiodev</span></tt></a> which defines useful symbolic constants like <tt class="xref py py-const docutils literal"><span class="pre">MIN_GAIN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">MAX_GAIN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">SPEAKER</span></tt>, etc. The names of the constants are the same names as used in the C include file <tt class="docutils literal"><span class="pre"><sun/audioio.h></span></tt>, with the leading string <tt class="docutils literal"><span class="pre">AUDIO_</span></tt> stripped.</p> </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 internal" href="#">39.1. <tt class="docutils literal"><span class="pre">sunaudiodev</span></tt> — Access to Sun audio hardware</a><ul> <li><a class="reference internal" href="#audio-device-objects">39.1.1. Audio Device Objects</a></li> </ul> </li> <li><a class="reference internal" href="#module-SUNAUDIODEV">39.2. <tt class="docutils literal"><span class="pre">SUNAUDIODEV</span></tt> — Constants used with <tt class="docutils literal"><span class="pre">sunaudiodev</span></tt></a></li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="sun.html" title="previous chapter">39. SunOS Specific Services</a></p> <h4>Next topic</h4> <p class="topless"><a href="undoc.html" title="next chapter">40. Undocumented Modules</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../bugs.html">Report a Bug</a></li> <li><a href="../_sources/library/sunaudio.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" /> <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="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="undoc.html" title="40. Undocumented Modules" >next</a> |</li> <li class="right" > <a href="sun.html" title="39. SunOS Specific Services" >previous</a> |</li> <li><img src="../_static/py.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li> <li><a href="http://www.python.org/">Python</a> »</li> <li> <a href="../index.html">Python 2.7.5 documentation</a> » </li> <li><a href="index.html" >The Python Standard Library</a> »</li> <li><a href="sun.html" >39. SunOS Specific Services</a> »</li> </ul> </div> <div class="footer"> © <a href="../copyright.html">Copyright</a> 1990-2020, 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 Oct 13, 2020. <a href="../bugs.html">Found a bug</a>? <br /> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>
Upload File
Create Folder