Updates for release 0.3:
setup.py was extended for pypi. doc/index.html is automatically rewritten by doc/src/Makefile to add SourceForge links. index.html is now the standard homepage for pyalsaaudio. Minor documentation fixes (capitalisation, spelling, etc.). Caspers email is hidden in the documentation. git-svn-id: svn://svn.code.sf.net/p/pyalsaaudio/code/trunk@14 ec2f30ec-7544-0410-870e-f70ca00c83f0
10
CHANGES
@@ -1,8 +1,12 @@
|
||||
VERSION 0.1
|
||||
- Initial version
|
||||
Version 0.3:
|
||||
- wrapped blocking calls with Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS
|
||||
- added pause
|
||||
|
||||
|
||||
VERSION 0.2
|
||||
Version 0.2:
|
||||
- Many bugfixes related to playback in particular
|
||||
- Module documentation in the doc subdirectory
|
||||
|
||||
|
||||
Version 0.1:
|
||||
- Initial version
|
||||
|
||||
@@ -8,26 +8,27 @@
|
||||
<link rel='help' href='about.html' title='About this document...' />
|
||||
<link rel="prev" href="contents.html" />
|
||||
<link rel="parent" href="pyalsaaudio.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>About this document ...</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.4 ALSA Examples"
|
||||
<td class='online-navigation'><a rel="prev" title="4.4 alsa Examples"
|
||||
href="pcm-example.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -35,17 +36,17 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="pcm-example.html">4.4 ALSA Examples</A>
|
||||
<a class="sectref" rel="prev" href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H1><A NAME="SECTION003000000000000000000">
|
||||
About this document ...</A>
|
||||
</H1>
|
||||
<h1><a name="SECTION003000000000000000000">
|
||||
About this document ...</a>
|
||||
</h1>
|
||||
<strong>PyAlsaAudio</strong>
|
||||
<p> This document was generated using the <a
|
||||
href="http://saftsack.fs.uni-bayreuth.de/~latex2ht/">
|
||||
@@ -72,23 +73,23 @@ About this document ...</A>
|
||||
Petrilli.
|
||||
</p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.4 ALSA Examples"
|
||||
<td class='online-navigation'><a rel="prev" title="4.4 alsa Examples"
|
||||
href="pcm-example.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -96,15 +97,15 @@ About this document ...</A>
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="pcm-example.html">4.4 ALSA Examples</A>
|
||||
<a class="sectref" rel="prev" href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
doc/blank.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
@@ -10,23 +10,24 @@
|
||||
<link rel="prev" href="front.html" />
|
||||
<link rel="parent" href="pyalsaaudio.html" />
|
||||
<link rel="next" href="node3.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>Contents</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="Front Matter"
|
||||
href="front.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="1 What is ALSA"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="1 what is ALSA"
|
||||
href="node3.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
@@ -37,49 +38,49 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="front.html">Front Matter</A>
|
||||
<a class="sectref" rel="prev" href="front.html">Front Matter</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node3.html">1 What is ALSA</A>
|
||||
<a class="sectref" rel="next" href="node3.html">1 What is ALSA</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
<BR><h2><A NAME="SECTION002000000000000000000">
|
||||
Contents</A>
|
||||
<br><h2><a name="SECTION002000000000000000000">
|
||||
Contents</a>
|
||||
</h2>
|
||||
<!--Table of Contents-->
|
||||
|
||||
<UL CLASS="TofC">
|
||||
<LI><UL>
|
||||
<LI><A href="node3.html">1 What is ALSA</a>
|
||||
<LI><A href="node4.html">2 ALSA and Python</a>
|
||||
<LI><A href="node5.html">3 Installation</a>
|
||||
<LI><A href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<UL>
|
||||
<LI><A href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<LI><A href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<LI><A href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<LI><A href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
<ul class="TofC">
|
||||
<li><ul>
|
||||
<li><a href="node3.html">1 What is ALSA</a>
|
||||
<li><a href="node4.html">2 ALSA and Python</a>
|
||||
<li><a href="node5.html">3 Installation</a>
|
||||
<li><a href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<ul>
|
||||
<li><a href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<li><a href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<li><a href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<li><a href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
</ul></ul></ul>
|
||||
<!--End of Table of Contents-->
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="Front Matter"
|
||||
href="front.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="1 What is ALSA"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="1 what is ALSA"
|
||||
href="node3.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
@@ -90,17 +91,17 @@ Contents</A>
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="front.html">Front Matter</A>
|
||||
<a class="sectref" rel="prev" href="front.html">Front Matter</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node3.html">1 What is ALSA</A>
|
||||
<a class="sectref" rel="next" href="node3.html">1 What is ALSA</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
doc/contents.png
Normal file
|
After Width: | Height: | Size: 649 B |
@@ -10,27 +10,28 @@
|
||||
<link rel="prev" href="pyalsaaudio.html" />
|
||||
<link rel="parent" href="pyalsaaudio.html" />
|
||||
<link rel="next" href="contents.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>Front Matter</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="Contents"
|
||||
href="contents.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -38,64 +39,64 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="prev" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="next" href="contents.html">Contents</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H1><A NAME="SECTION001000000000000000000"></A><A NAME="front"></A>
|
||||
<BR>
|
||||
<h1><a name="SECTION001000000000000000000"></a><a name="front"></a>
|
||||
<br>
|
||||
Front Matter
|
||||
</H1>
|
||||
</h1>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
This software is licensed under the PSF license - the same one used
|
||||
by the majority of the python distribution. Basically you can use it
|
||||
for anything you wish (even commercial purposes). There is no warranty
|
||||
whatsoever.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<H3>Abstract:</H3>
|
||||
<DIV CLASS="ABSTRACT">
|
||||
<h3>Abstract:</h3>
|
||||
<div class="ABSTRACT">
|
||||
|
||||
This package contains wrappers for accessing the ALSA api from Python. It
|
||||
This package contains wrappers for accessing the ALSA API from Python. It
|
||||
is currently fairly complete for PCM devices and Mixer access. MIDI sequencer
|
||||
support is low on my priority list, but volunteers are welcome.
|
||||
|
||||
<P>
|
||||
If you find bugs in the wrappers please notify me on email. Please
|
||||
<p>
|
||||
If you find bugs in the wrappers please use the SourceForge bug tracker. Please
|
||||
don't send bug reports regarding ALSA specifically. There are several
|
||||
bugs in this api, and those should be reported to the ALSA team - not
|
||||
bugs in this API, and those should be reported to the ALSA team - not
|
||||
me.
|
||||
</DIV>
|
||||
<P>
|
||||
</div>
|
||||
<p>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="PyAlsaAudio"
|
||||
href="pyalsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="Contents"
|
||||
href="contents.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -103,17 +104,17 @@ me.
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="prev" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</A>
|
||||
<a class="sectref" rel="parent" href="pyalsaaudio.html">PyAlsaAudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="next" href="contents.html">Contents</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,25 +7,26 @@
|
||||
<link rel='last' href='about.html' title='About this document...' />
|
||||
<link rel='help' href='about.html' title='About this document...' />
|
||||
<link rel="next" href="front.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>PyAlsaAudio</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></td>
|
||||
<td class='online-navigation'><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></td>
|
||||
<td class='online-navigation'><a rel="next" title="Front Matter"
|
||||
href="front.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -33,49 +34,55 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</A>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<div class="titlepage">
|
||||
<div class='center'>
|
||||
<h1>PyAlsaAudio</h1>
|
||||
<p><b><font size="+2">Casper Wilstrup</font></b></p>
|
||||
<p>cwi@unispeed.com</p>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<p><br /></p><hr class='online-navigation' />
|
||||
<div class='online-navigation'>
|
||||
<!--Table of Child-Links-->
|
||||
<A NAME="CHILD_LINKS"></a>
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/">SourceForge</li>
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/pyalsaaudio/">Summary page</a>
|
||||
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=120651">Download</a>
|
||||
<li><a href="http://sourceforge.net/tracker/?group_id=120651">Bug Tracker</a>
|
||||
</ul>
|
||||
</ul><a name="CHILD_LINKS"></a>
|
||||
|
||||
<UL CLASS="ChildLinks">
|
||||
<LI><A href="front.html">Front Matter</a>
|
||||
<LI><A href="contents.html">Contents</a>
|
||||
<UL>
|
||||
<LI><A href="node3.html">1 What is ALSA</a>
|
||||
<LI><A href="node4.html">2 ALSA and Python</a>
|
||||
<LI><A href="node5.html">3 Installation</a>
|
||||
<LI><A href="module-alsaaudio.html">4 <tt class="module">alsaaudio</tt></a>
|
||||
<UL>
|
||||
<LI><A href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<LI><A href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<LI><A href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<LI><A href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
<ul class="ChildLinks">
|
||||
<li><a href="front.html">Front Matter</a>
|
||||
<li><a href="contents.html">Contents</a>
|
||||
<ul>
|
||||
<li><a href="node3.html">1 What is ALSA</a>
|
||||
<li><a href="node4.html">2 ALSA and Python</a>
|
||||
<li><a href="node5.html">3 Installation</a>
|
||||
<li><a href="module-alsaaudio.html">4 <tt class="module">alsaaudio</tt></a>
|
||||
<ul>
|
||||
<li><a href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<li><a href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<li><a href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<li><a href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
</ul>
|
||||
</ul>
|
||||
<LI><A href="about.html">About this document ...</a>
|
||||
<li><a href="about.html">About this document ...</a>
|
||||
</ul>
|
||||
<!--End of Table of Child-Links-->
|
||||
</div>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
@@ -83,14 +90,14 @@
|
||||
<td class='online-navigation'><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></td>
|
||||
<td class='online-navigation'><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></td>
|
||||
<td class='online-navigation'><a rel="next" title="Front Matter"
|
||||
href="front.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -98,13 +105,13 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</A>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
doc/index.png
Normal file
|
After Width: | Height: | Size: 529 B |
@@ -10,27 +10,28 @@
|
||||
<link rel="prev" href="pcm-objects.html" />
|
||||
<link rel="parent" href="module-alsaaudio.html" />
|
||||
<link rel="next" href="pcm-example.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>4.3 Mixer Objects</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.2 PCM Objects"
|
||||
<td class='online-navigation'><a rel="prev" title="4.2 pcm Objects"
|
||||
href="pcm-objects.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.4 ALSA Examples"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.4 alsa Examples"
|
||||
href="pcm-example.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -38,26 +39,26 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="pcm-objects.html">4.2 PCM Objects</A>
|
||||
<a class="sectref" rel="prev" href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="pcm-example.html">4.4 ALSA Examples</A>
|
||||
<a class="sectref" rel="next" href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H2><A NAME="SECTION002430000000000000000"></A>
|
||||
<A NAME="mixer-objects"></A>
|
||||
<BR>
|
||||
<h2><a name="SECTION002430000000000000000"></a>
|
||||
<a name="mixer-objects"></a>
|
||||
<br>
|
||||
4.3 Mixer Objects
|
||||
</H2>
|
||||
</h2>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Mixer objects provides access to the ALSA mixer API.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><span class="typelabel">class</span> <tt id='l2h-16' xml:id='l2h-16' class="class">Mixer</tt></b>(</nobr></td>
|
||||
<td><var></var><big>[</big><var>control</var><big>]</big><var>, </var><big>[</big><var>id</var><big>]</big><var>, </var><big>[</big><var>cardname</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
@@ -66,18 +67,18 @@ Mixer objects provides access to the ALSA mixer API.
|
||||
of available controls can be found with the <tt class="module">alsaaudio</tt>.<tt class="function">mixers</tt> function.
|
||||
The default value is 'Master' - other common controls include 'Master Mono', 'PCM', 'Line', etc.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<var>id</var> - the id of the mixer control. Default is 0
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<var>cardname</var> - specifies which card should be used (this is only relevant
|
||||
if you have more than one sound card). Omit to use the default sound card
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Mixer objects have the following methods:
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-17' xml:id='l2h-17' class="method">cardname</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -85,7 +86,7 @@ Mixer objects have the following methods:
|
||||
Return the name of the sound card used by this Mixer object
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-18' xml:id='l2h-18' class="method">mixer</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -94,7 +95,7 @@ Return the name of the specific mixer controlled by this object, For example 'Ma
|
||||
or 'PCM'
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-19' xml:id='l2h-19' class="method">mixerid</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -102,7 +103,7 @@ or 'PCM'
|
||||
Return the ID of the ALSA mixer controlled by this object.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-20' xml:id='l2h-20' class="method">switchcap</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -110,7 +111,7 @@ Return the ID of the ALSA mixer controlled by this object.
|
||||
Returns a list of the switches which are defined by this specific mixer. Possible values in
|
||||
this list are:
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<div class="center"><table class="realtable">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -119,27 +120,27 @@ this list are:
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Mute'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Mute'</volume></td>
|
||||
<td class="left" >This mixer can be muted</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Joined Mute'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Joined Mute'</volume></td>
|
||||
<td class="left" >This mixer can mute all channels at the same time</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Playback Mute'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Playback Mute'</volume></td>
|
||||
<td class="left" >This mixer can mute the playback output</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Joined Playback Mute'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Joined Playback Mute'</volume></td>
|
||||
<td class="left" >Mute playback for all channels at the same time</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Capture Mute'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Capture Mute'</volume></td>
|
||||
<td class="left" >Mute sound capture</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Joined Capture Mute'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Joined Capture Mute'</volume></td>
|
||||
<td class="left" >Mute sound capture for all channels at a time</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Capture Exclusive'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Capture Exclusive'</volume></td>
|
||||
<td class="left" >Not quite sure what this is</td></tr></tbody>
|
||||
</table></div>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
To manipulate these swithes use the <tt class="method">setrec</tt> or <tt class="method">setmute</tt> methods
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-21' xml:id='l2h-21' class="method">volumecap</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -147,7 +148,7 @@ To manipulate these swithes use the <tt class="method">setrec</tt> or <tt class=
|
||||
Returns a list of the volume control capabilities of this mixer. Possible values in
|
||||
the list are:
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<div class="center"><table class="realtable">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -156,24 +157,24 @@ the list are:
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Volume'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Volume'</volume></td>
|
||||
<td class="left" >This mixer can control volume</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Joined Volume'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Joined Volume'</volume></td>
|
||||
<td class="left" >This mixer can control volume for all channels at the same time</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Playback Volume'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Playback Volume'</volume></td>
|
||||
<td class="left" >This mixer can manipulate the playback volume</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Joined Playback Volume'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Joined Playback Volume'</volume></td>
|
||||
<td class="left" >Manipulate playback volumne for all channels at the same time</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Capture Volume'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Capture Volume'</volume></td>
|
||||
<td class="left" >Manipulate sound capture volume</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Volume Capabilities>'Joined Capture Volume'</Volume></td>
|
||||
<tr><td class="left" valign="baseline"><volume capabilities>'Joined Capture Volume'</volume></td>
|
||||
<td class="left" >Manipulate sound capture volume for all channels at a time</td></tr></tbody>
|
||||
</table></div>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-22' xml:id='l2h-22' class="method">getvolume</tt></b>(</nobr></td>
|
||||
<td><var></var><big>[</big><var>direction</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
@@ -181,26 +182,26 @@ the list are:
|
||||
Returns a list with the current volume settings for each channel. The list elements
|
||||
are integer percentages.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The optional <var>direction</var> argument can be either 'playback' or 'capture', which is relevant
|
||||
if the mixer can control both playback and capture volume. The default value is 'playback'
|
||||
if the mixer has this capability, otherwise 'capture'
|
||||
|
||||
<P>
|
||||
<p>
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-23' xml:id='l2h-23' class="method">getmute</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
<dd>
|
||||
Return a list indicating the current mute setting for each channel. 0 means not muted, 1 means muted.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
This method will fail if the mixer has no playback switch capabilities.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-24' xml:id='l2h-24' class="method">getrec</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -208,11 +209,11 @@ This method will fail if the mixer has no playback switch capabilities.
|
||||
Return a list indicating the current record mute setting for each channel. 0 means not recording, 1
|
||||
means not recording.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
This method will fail if the mixer has no capture switch capabilities.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-25' xml:id='l2h-25' class="method">setvolume</tt></b>(</nobr></td>
|
||||
<td><var>volume,</var><big>[</big><var>channel</var><big>]</big><var>,</var><big>[</big><var>direction</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
@@ -220,32 +221,32 @@ This method will fail if the mixer has no capture switch capabilities.
|
||||
Change the current volume settings for this mixer. The <var>volume</var> argument controls
|
||||
the new volume setting as an integer percentage.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
If the optional argument <var>channel</var> is present, the volume is set only for this channel. This
|
||||
assumes that the mixer can control the volume for the channels independently.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The optional <var>direction</var> argument can be either 'playback' or 'capture' is relevant if the mixer
|
||||
has independent playback and capture volume capabilities, and controls which of the volumes
|
||||
if changed. The default is 'playback' if the mixer has this capability, otherwise 'capture'.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-26' xml:id='l2h-26' class="method">setmute</tt></b>(</nobr></td>
|
||||
<td><var>mute, </var><big>[</big><var>channel</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
<dd>
|
||||
Sets the mute flag to a new value. The <var>mute</var> argument is either 0 for not muted, or 1 for muted.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The optional <var>channel</var> argument controls which channel is muted. The default is to set the mute flag
|
||||
for all channels.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
This method will fail if the mixer has no playback mute capabilities
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-27' xml:id='l2h-27' class="method">setrec</tt></b>(</nobr></td>
|
||||
<td><var>capture,</var><big>[</big><var>channel</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
@@ -253,57 +254,57 @@ This method will fail if the mixer has no playback mute capabilities
|
||||
Sets the capture mute flag to a new value. The <var>capture</var> argument is either 0 for no capture,
|
||||
or 1 for capture.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The optional <var>channel</var> argument controls which channel is changed. The default is to set the capture flag
|
||||
for all channels.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
This method will fail if the mixer has no capture switch capabilities
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<b>A Note on the ALSA Mixer API</b>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The ALSA mixer API is extremely complicated - and hardly documented at all. <tt class="module">alsaaudio</tt> implements
|
||||
a much simplified way to access this API. In designing the API I've had to make some choices which
|
||||
may limit what can and cannot be controlled through the API. However, If I had chosen to implement the
|
||||
full API, I would have reexposed the horrible complexity/documentation ratio of the underlying API.
|
||||
At least the <tt class="module">alsaaudio</tt> API is easy to understand and use.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
If my design choises prevents you from doing something that the underlying API would have allowed,
|
||||
please let me know, so I can incorporate these need into future versions.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
If the current state of affairs annoy you, the best you can do is to write a HOWTO on the API and
|
||||
make this available on the net. Until somebody does this, the availability of ALSA mixer capable
|
||||
devices will stay quite limited.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Unfortunately, I'm not able to create such a HOWTO myself, since I only understand half of the API,
|
||||
and that which I do understand has come from a painful trial and error process.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.2 PCM Objects"
|
||||
<td class='online-navigation'><a rel="prev" title="4.2 pcm Objects"
|
||||
href="pcm-objects.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.4 ALSA Examples"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.4 alsa Examples"
|
||||
href="pcm-example.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -311,17 +312,17 @@ and that which I do understand has come from a painful trial and error process.
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="pcm-objects.html">4.2 PCM Objects</A>
|
||||
<a class="sectref" rel="prev" href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="pcm-example.html">4.4 ALSA Examples</A>
|
||||
<a class="sectref" rel="next" href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,27 +9,28 @@
|
||||
<link rel="prev" href="node5.html" />
|
||||
<link rel="parent" href="contents.html" />
|
||||
<link rel="next" href="node7.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>4 alsaaudio</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="3 Installation"
|
||||
href="node5.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.1 PCM Terminology and"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.1 pcm Terminology and"
|
||||
href="node7.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -37,72 +38,73 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node5.html">3 Installation</A>
|
||||
<a class="sectref" rel="prev" href="node5.html">3 Installation</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node7.html">4.1 PCM Terminology and</A>
|
||||
<a class="sectref" rel="next" href="node7.html">4.1 PCM Terminology and</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H1><A NAME="SECTION002400000000000000000">
|
||||
4 <tt class="module">alsaaudio</tt></A>
|
||||
</H1>
|
||||
<h1><a name="SECTION002400000000000000000">
|
||||
4 <tt class="module">alsaaudio</tt></a>
|
||||
</h1>
|
||||
|
||||
<P>
|
||||
<A NAME="module-alsaaudio"></A>
|
||||
<P>
|
||||
<p>
|
||||
<a name="module-alsaaudio"></a>
|
||||
<p>
|
||||
|
||||
<p class="availability">Availability: <span
|
||||
class="platform">Linux</span>.</p>
|
||||
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
tex2html_comment_mark>15
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<p>
|
||||
The <tt class="module">alsaaudio</tt> module defines functions and classes for using
|
||||
ALSA.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-2' xml:id='l2h-2' class="function">mixers</tt></b>(</nobr></td>
|
||||
<td><var></var><big>[</big><var>cardname</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
<dd>
|
||||
List the available mixers. The optional <var>cardname</var> specifies which
|
||||
card should be queried (this is only relevant if you have more than one
|
||||
sound card). Omit to use the default sound card
|
||||
sound card). Omit to use the default sound card.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><span class="typelabel">class</span> <tt id='l2h-3' xml:id='l2h-3' class="class">PCM</tt></b>(</nobr></td>
|
||||
<td><var></var><big>[</big><var>type</var><big>]</big><var>, </var><big>[</big><var>mode</var><big>]</big><var>, </var><big>[</big><var>cardname</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
<dd>
|
||||
This class is used to represent a PCM device (both playback and capture devices).
|
||||
The arguments are:
|
||||
<BR><var>type</var> - can be either PCM_CAPTURE or PCM_PLAYBACK (default).
|
||||
<BR><var>mode</var> - can be either PCM_NONBLOCK, PCM_ASYNC, or PCM_NORMAL (the default).
|
||||
<BR><var>cardname</var> - specifies which card should be used (this is only relevant
|
||||
<br><var>type</var> - can be either PCM_CAPTURE or PCM_PLAYBACK (default).
|
||||
<br><var>mode</var> - can be either PCM_NONBLOCK, PCM_ASYNC, or PCM_NORMAL (the default).
|
||||
<br><var>cardname</var> - specifies which card should be used (this is only relevant
|
||||
if you have more than one sound card). Omit to use the default sound card
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><span class="typelabel">class</span> <tt id='l2h-4' xml:id='l2h-4' class="class">Mixer</tt></b>(</nobr></td>
|
||||
<td><var></var><big>[</big><var>control</var><big>]</big><var>, </var><big>[</big><var>id</var><big>]</big><var>, </var><big>[</big><var>cardname</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
<dd>
|
||||
This class is used to access a specific ALSA mixer.
|
||||
The arguments are:
|
||||
<BR><var>control</var> - Name of the chosen mixed (default is Master).
|
||||
<BR><var>id</var> - id of mixer (default is 0) - More explaniation needed here
|
||||
<BR><var>cardname</var> specifies which card should be used (this is only relevant
|
||||
<br><var>control</var> - Name of the chosen mixed (default is Master).
|
||||
<br><var>id</var> - id of mixer (default is 0) - More explaniation needed here
|
||||
<br><var>cardname</var> specifies which card should be used (this is only relevant
|
||||
if you have more than one sound card). Omit to use the default sound card
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><b><span class="typelabel">exception</span> <tt id='l2h-5' xml:id='l2h-5' class="exception">ALSAAudioError</tt></b></dt>
|
||||
<dd>
|
||||
Exception raised when an operation fails for a ALSA specific reason.
|
||||
@@ -110,40 +112,40 @@ The exception argument is a string describing the reason of the
|
||||
failure.
|
||||
</dd></dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<p><br /></p><hr class='online-navigation' />
|
||||
<div class='online-navigation'>
|
||||
<!--Table of Child-Links-->
|
||||
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a>
|
||||
<a name="CHILD_LINKS"><strong>Subsections</strong></a>
|
||||
|
||||
<UL CLASS="ChildLinks">
|
||||
<LI><A href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<LI><A href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<LI><A href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<LI><A href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
<ul class="ChildLinks">
|
||||
<li><a href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<li><a href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<li><a href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<li><a href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
</ul>
|
||||
<!--End of Table of Child-Links-->
|
||||
</div>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="3 Installation"
|
||||
href="node5.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.1 PCM Terminology and"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.1 pcm Terminology and"
|
||||
href="node7.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -151,17 +153,17 @@ failure.
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node5.html">3 Installation</A>
|
||||
<a class="sectref" rel="prev" href="node5.html">3 Installation</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node7.html">4.1 PCM Terminology and</A>
|
||||
<a class="sectref" rel="next" href="node7.html">4.1 PCM Terminology and</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
doc/modules.png
Normal file
|
After Width: | Height: | Size: 598 B |
BIN
doc/next.png
Normal file
|
After Width: | Height: | Size: 511 B |
@@ -10,27 +10,28 @@
|
||||
<link rel="prev" href="contents.html" />
|
||||
<link rel="parent" href="contents.html" />
|
||||
<link rel="next" href="node4.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>1 What is ALSA</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="Contents"
|
||||
href="contents.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="2 ALSA and Python"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="2 alsa and Python"
|
||||
href="node4.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -38,65 +39,65 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="prev" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node4.html">2 ALSA and Python</A>
|
||||
<a class="sectref" rel="next" href="node4.html">2 ALSA and Python</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H1><A NAME="SECTION002100000000000000000">
|
||||
1 What is ALSA</A>
|
||||
</H1>
|
||||
<h1><a name="SECTION002100000000000000000">
|
||||
1 What is ALSA</a>
|
||||
</h1>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
|
||||
functionality to the Linux operating system.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Logically ALSA consists of these components:
|
||||
|
||||
<UL>
|
||||
<LI>A set of kernel drivers.
|
||||
<BR>
|
||||
<ul>
|
||||
<li>A set of kernel drivers.
|
||||
<br>
|
||||
These drivers are responsible for handling the physical sound
|
||||
hardware from within the Linux kernel, and have been the standard
|
||||
sound implementation in Linux since kernel version 2.5
|
||||
</LI>
|
||||
<LI>A kernel level API for manipulating the ALSA devices.
|
||||
</LI>
|
||||
<LI>A user-space C library for simplified access to the sound hardware
|
||||
</li>
|
||||
<li>A kernel level API for manipulating the ALSA devices.
|
||||
</li>
|
||||
<li>A user-space C library for simplified access to the sound hardware
|
||||
from userspace applications. This library is called <i>libasound</i>
|
||||
and is required by all ALSA capable applications.
|
||||
</LI>
|
||||
</UL>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
More information about ALSA may be found on the project homepage
|
||||
<a class="url" href="http://www.alsa-project.org">http://www.alsa-project.org</a>
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="Contents"
|
||||
href="contents.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="2 ALSA and Python"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="2 alsa and Python"
|
||||
href="node4.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -104,17 +105,17 @@ More information about ALSA may be found on the project homepage
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="prev" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node4.html">2 ALSA and Python</A>
|
||||
<a class="sectref" rel="next" href="node4.html">2 ALSA and Python</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,27 +10,28 @@
|
||||
<link rel="prev" href="node3.html" />
|
||||
<link rel="parent" href="contents.html" />
|
||||
<link rel="next" href="node5.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>2 ALSA and Python</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="1 What is ALSA"
|
||||
<td class='online-navigation'><a rel="prev" title="1 what is ALSA"
|
||||
href="node3.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="3 Installation"
|
||||
href="node5.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -38,61 +39,61 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node3.html">1 What is ALSA</A>
|
||||
<a class="sectref" rel="prev" href="node3.html">1 What is ALSA</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node5.html">3 Installation</A>
|
||||
<a class="sectref" rel="next" href="node5.html">3 Installation</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H1><A NAME="SECTION002200000000000000000">
|
||||
2 ALSA and Python</A>
|
||||
</H1>
|
||||
<h1><a name="SECTION002200000000000000000">
|
||||
2 ALSA and Python</a>
|
||||
</h1>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The older Linux sound API (OSS) which is now deprecated is well supported
|
||||
from the standard Python library, through the ossaudiodev module. No native
|
||||
ALSA support exists in the standard library (yet).
|
||||
|
||||
<P>
|
||||
<p>
|
||||
There are a few other ``ALSA for Python'' projects available, including at
|
||||
least two different projects called pyAlsa. Neither of these seem to be under
|
||||
active development at the time - and neither are very feature complete.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
I wrote PyAlsaAudio to fill this gap. My long term goal is to have the module
|
||||
included in the standard Python library, but that is probably a while of yet.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
PyAlsaAudio hass full support for sound capture, playback of sound, as well as
|
||||
the ALSA Mixer API.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
MIDI support is not available, and since I don't own any MIDI hardware, it's
|
||||
difficult for me to implement it. Volunteers to work on this would be greatly
|
||||
appreciated
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="1 What is ALSA"
|
||||
<td class='online-navigation'><a rel="prev" title="1 what is ALSA"
|
||||
href="node3.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="3 Installation"
|
||||
href="node5.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -100,17 +101,17 @@ appreciated
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node3.html">1 What is ALSA</A>
|
||||
<a class="sectref" rel="prev" href="node3.html">1 What is ALSA</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="node5.html">3 Installation</A>
|
||||
<a class="sectref" rel="next" href="node5.html">3 Installation</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,27 +10,28 @@
|
||||
<link rel="prev" href="node4.html" />
|
||||
<link rel="parent" href="contents.html" />
|
||||
<link rel="next" href="module-alsaaudio.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>3 Installation</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="2 ALSA and Python"
|
||||
<td class='online-navigation'><a rel="prev" title="2 alsa and Python"
|
||||
href="node4.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -38,21 +39,21 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node4.html">2 ALSA and Python</A>
|
||||
<a class="sectref" rel="prev" href="node4.html">2 ALSA and Python</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="next" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H1><A NAME="SECTION002300000000000000000">
|
||||
3 Installation</A>
|
||||
</H1>
|
||||
<h1><a name="SECTION002300000000000000000">
|
||||
3 Installation</a>
|
||||
</h1>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Note: the wrappers link with the alsasound library (from the alsa-lib
|
||||
package). Verify that this is installed by looking for /usr/lib/libasound.so
|
||||
before building. Naturally you also need to use a kernel with proper ALSA
|
||||
@@ -60,38 +61,38 @@ support. This is the default in Linux kernel 2.6 and later. If you are using
|
||||
kernel version 2.4 you may need to install the ALSA patches yourself - although
|
||||
most distributions ship with ALSA kernels.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
To install, execute the following:
|
||||
<BR><div class="verbatim"><pre>
|
||||
<br><div class="verbatim"><pre>
|
||||
$ python setup.py build
|
||||
</pre></div>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
And then as root:
|
||||
<BR><div class="verbatim"><pre>
|
||||
<br><div class="verbatim"><pre>
|
||||
# python setup.py install
|
||||
</pre></div>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="2 ALSA and Python"
|
||||
<td class='online-navigation'><a rel="prev" title="2 alsa and Python"
|
||||
href="node4.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="Contents"
|
||||
href="contents.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -99,17 +100,17 @@ And then as root:
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node4.html">2 ALSA and Python</A>
|
||||
<a class="sectref" rel="prev" href="node4.html">2 ALSA and Python</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</A>
|
||||
<a class="sectref" rel="parent" href="contents.html">Contents</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="next" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
125
doc/node7.html
@@ -10,27 +10,28 @@
|
||||
<link rel="prev" href="module-alsaaudio.html" />
|
||||
<link rel="parent" href="module-alsaaudio.html" />
|
||||
<link rel="next" href="pcm-objects.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>4.1 PCM Terminology and Concepts</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.2 PCM Objects"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.2 pcm Objects"
|
||||
href="pcm-objects.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -38,72 +39,72 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="prev" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="pcm-objects.html">4.2 PCM Objects</A>
|
||||
<a class="sectref" rel="next" href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H2><A NAME="SECTION002410000000000000000">
|
||||
4.1 PCM Terminology and Concepts</A>
|
||||
</H2>
|
||||
<h2><a name="SECTION002410000000000000000">
|
||||
4.1 PCM Terminology and Concepts</a>
|
||||
</h2>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
In order to use PCM devices it is useful to be familiar with some concepts and
|
||||
terminology.
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
<DT><STRONG>Sample</STRONG></DT>
|
||||
<DD>PCM audio, whether it is input or output, consists at the lowest level
|
||||
<p>
|
||||
<dl>
|
||||
<dt><strong>Sample</strong></dt>
|
||||
<dd>PCM audio, whether it is input or output, consists at the lowest level
|
||||
of a number of single samples. A sample represents the sound in a single channel in
|
||||
a brief interval. If more than one channel is in use, more than one sample is required
|
||||
for each interval to describe the sound. Samples can be of many different sizes, ranging
|
||||
from 8 bit to 64 bit presition. The specific format of each sample can also vary - they
|
||||
can be big endian byte order, little endian byte order, or even floats.
|
||||
|
||||
<P>
|
||||
</DD>
|
||||
<DT><STRONG>Frame</STRONG></DT>
|
||||
<DD>A frame consists of exactly one sample per channel. If there is only one
|
||||
<p>
|
||||
</dd>
|
||||
<dt><strong>Frame</strong></dt>
|
||||
<dd>A frame consists of exactly one sample per channel. If there is only one
|
||||
channel (Mono sound) a frame is simply a single sample. If the sound is stereo, each frame
|
||||
consists of two samples, etc.
|
||||
|
||||
<P>
|
||||
</DD>
|
||||
<DT><STRONG>Frame size</STRONG></DT>
|
||||
<DD>This is the size in bytes of each frame. This can vary a lot: if each sample is
|
||||
<p>
|
||||
</dd>
|
||||
<dt><strong>Frame size</strong></dt>
|
||||
<dd>This is the size in bytes of each frame. This can vary a lot: if each sample is
|
||||
8 bits, and we're handling mono sound, the frame size is one byte. Similarly in 6 channel audio with
|
||||
64 bit floating point samples, the frame size is 48 bytes
|
||||
|
||||
<P>
|
||||
</DD>
|
||||
<DT><STRONG>Rate</STRONG></DT>
|
||||
<DD>PCM sound consists of a flow of sound frames. The sound rate controls how often
|
||||
<p>
|
||||
</dd>
|
||||
<dt><strong>Rate</strong></dt>
|
||||
<dd>PCM sound consists of a flow of sound frames. The sound rate controls how often
|
||||
the current frame is replaced. For example, a rate of 8000 Hz means that a new frame is played
|
||||
or captured 8000 times per second.
|
||||
|
||||
<P>
|
||||
</DD>
|
||||
<DT><STRONG>Data rate</STRONG></DT>
|
||||
<DD>This is the number of bytes, which must be recorded or provided per second
|
||||
<p>
|
||||
</dd>
|
||||
<dt><strong>Data rate</strong></dt>
|
||||
<dd>This is the number of bytes, which must be recorded or provided per second
|
||||
at a certain frame size and rate.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
8000 Hz mono sound with 8 bit (1 byte) samples has a data rate of 8000 * 1 * 1 = 8 kb/s
|
||||
|
||||
<P>
|
||||
<p>
|
||||
At the other end of the scale, 96000 Hz, 6 channel sound with 64 bit (8 bytes) samples
|
||||
has a data rate of 96000 * 6 * 8 = 4608 kb/s (almost 5 Mb sound data per second)
|
||||
|
||||
<P>
|
||||
</DD>
|
||||
<DT><STRONG>Period</STRONG></DT>
|
||||
<DD>When the hardware processes data this is done in chunks of frames. The time interval
|
||||
<p>
|
||||
</dd>
|
||||
<dt><strong>Period</strong></dt>
|
||||
<dd>When the hardware processes data this is done in chunks of frames. The time interval
|
||||
between each processing (A/D or D/A conversion) is known as the period. The size of the period has
|
||||
direct implication on the latency of the sound input or output. For low-latency the period size should
|
||||
be very small, while low CPU resource usage would usually demand larger period sizes. With ALSA, the
|
||||
@@ -111,41 +112,41 @@ CPU utilization is not impacted much by the period size, since the kernel layer
|
||||
periods internally, so each period generates an interrupt and a memory copy, but userspace can be
|
||||
slower and read or write multiple periods at the same time.
|
||||
|
||||
<P>
|
||||
</DD>
|
||||
<DT><STRONG>Period size</STRONG></DT>
|
||||
<DD>This is the size of each period in Hz. <em>Not bytes, but Hz!.</em> In <tt class="module">alsaaudio</tt>
|
||||
<p>
|
||||
</dd>
|
||||
<dt><strong>Period size</strong></dt>
|
||||
<dd>This is the size of each period in Hz. <em>Not bytes, but Hz!.</em> In <tt class="module">alsaaudio</tt>
|
||||
the period size is set directly, and it is therefore important to understand the significance of this
|
||||
number. If the period size is configured to for example 32, each write should contain exactly 32 frames
|
||||
of sound data, and each read will return either 32 frames of data or nothing at all.
|
||||
|
||||
<P>
|
||||
</DD>
|
||||
</DL>
|
||||
<p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Once you understand these concepts, you will be ready to actually utilize PCM API. Read on.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.2 PCM Objects"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.2 pcm Objects"
|
||||
href="pcm-objects.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -153,17 +154,17 @@ Once you understand these concepts, you will be ready to actually utilize PCM AP
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="prev" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="pcm-objects.html">4.2 PCM Objects</A>
|
||||
<a class="sectref" rel="next" href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,27 +9,28 @@
|
||||
<link rel="prev" href="mixer-objects.html" />
|
||||
<link rel="parent" href="module-alsaaudio.html" />
|
||||
<link rel="next" href="about.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>4.4 ALSA Examples </title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.3 Mixer Objects"
|
||||
<td class='online-navigation'><a rel="prev" title="4.3 mixer Objects"
|
||||
href="mixer-objects.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="About this document ..."
|
||||
href="about.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -37,45 +38,45 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="mixer-objects.html">4.3 Mixer Objects</A>
|
||||
<a class="sectref" rel="prev" href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="about.html">About this document ...</A>
|
||||
<a class="sectref" rel="next" href="about.html">About this document ...</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H2><A NAME="SECTION002440000000000000000"></A><A NAME="pcm-example"></A>
|
||||
<BR>
|
||||
<h2><a name="SECTION002440000000000000000"></a><a name="pcm-example"></a>
|
||||
<br>
|
||||
4.4 ALSA Examples
|
||||
</H2>
|
||||
</h2>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
For now, the only examples available are the 'playbacktest.py' and the 'recordtest.py' programs included.
|
||||
This will change in a future version.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.3 Mixer Objects"
|
||||
<td class='online-navigation'><a rel="prev" title="4.3 mixer Objects"
|
||||
href="mixer-objects.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="About this document ..."
|
||||
href="about.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -83,17 +84,17 @@ This will change in a future version.
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="mixer-objects.html">4.3 Mixer Objects</A>
|
||||
<a class="sectref" rel="prev" href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="about.html">About this document ...</A>
|
||||
<a class="sectref" rel="next" href="about.html">About this document ...</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,27 +10,28 @@
|
||||
<link rel="prev" href="node7.html" />
|
||||
<link rel="parent" href="module-alsaaudio.html" />
|
||||
<link rel="next" href="mixer-objects.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>4.2 PCM Objects</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.1 PCM Terminology and"
|
||||
<td class='online-navigation'><a rel="prev" title="4.1 pcm Terminology and"
|
||||
href="node7.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.3 Mixer Objects"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.3 mixer Objects"
|
||||
href="mixer-objects.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -38,71 +39,71 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node7.html">4.1 PCM Terminology and</A>
|
||||
<a class="sectref" rel="prev" href="node7.html">4.1 PCM Terminology and</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="mixer-objects.html">4.3 Mixer Objects</A>
|
||||
<a class="sectref" rel="next" href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<H2><A NAME="SECTION002420000000000000000"></A>
|
||||
<A NAME="pcm-objects"></A>
|
||||
<BR>
|
||||
<h2><a name="SECTION002420000000000000000"></a>
|
||||
<a name="pcm-objects"></a>
|
||||
<br>
|
||||
4.2 PCM Objects
|
||||
</H2>
|
||||
</h2>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The acronym PCM is short for Pulse Code Modulation and is the method used in ALSA
|
||||
and many other places to handle playback and capture of sampled sound data.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
PCM objects in <tt class="module">alsaaudio</tt> are used to do exactly that, either play sample based
|
||||
sound or capture sound from some input source (perhaps a microphone). The PCM object
|
||||
constructor takes the following arguments:
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><span class="typelabel">class</span> <tt id='l2h-6' xml:id='l2h-6' class="class">PCM</tt></b>(</nobr></td>
|
||||
<td><var></var><big>[</big><var>type</var><big>]</big><var>, </var><big>[</big><var>mode</var><big>]</big><var>, </var><big>[</big><var>cardname</var><big>]</big><var></var>)</td></tr></table></dt>
|
||||
<dd>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<var>type</var> - can be either PCM_CAPTURE or PCM_PLAYBACK (default).
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<var>mode</var> - can be either PCM_NONBLOCK, PCM_ASYNC, or PCM_NORMAL (the default).
|
||||
In PCM_NONBLOCK mode, calls to read will return immediately independent of wether
|
||||
there is any actual data to read. Similarly, write calls will return immediately
|
||||
without actually writing anything to the playout buffer if the buffer is full.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
In the current version of <tt class="module">alsaaudio</tt> PCM_ASYNC is useless, since it relies
|
||||
on a callback procedure, which can't be specified from Python.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<var>cardname</var> - specifies which card should be used (this is only relevant
|
||||
if you have more than one sound card). Omit to use the default sound card
|
||||
|
||||
<P>
|
||||
<p>
|
||||
This will construct a PCM object with default settings:
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Sample format: PCM_FORMAT_S16_LE
|
||||
<BR>
|
||||
<br>
|
||||
Rate: 8000 Hz
|
||||
<BR>
|
||||
<br>
|
||||
Channels: 2
|
||||
<BR>
|
||||
<br>
|
||||
Period size: 32 frames
|
||||
<BR></dl>
|
||||
<br></dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
PCM objects have the following methods:
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-7' xml:id='l2h-7' class="method">pcmtype</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -110,7 +111,7 @@ PCM objects have the following methods:
|
||||
Returns the type of PCM object. Either PCM_CAPTURE or PCM_PLAYBACK.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-8' xml:id='l2h-8' class="method">pcmmode</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -118,7 +119,7 @@ Returns the type of PCM object. Either PCM_CAPTURE or PCM_PLAYBACK.
|
||||
Return the mode of the PCM object. One of PCM_NONBLOCK, PCM_ASYNC, or PCM_NORMAL
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-9' xml:id='l2h-9' class="method">cardname</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -126,7 +127,7 @@ Return the mode of the PCM object. One of PCM_NONBLOCK, PCM_ASYNC, or PCM_NORMAL
|
||||
Return the name of the sound card used by this PCM object.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-10' xml:id='l2h-10' class="method">setchannels</tt></b>(</nobr></td>
|
||||
<td><var>nchannels</var>)</td></tr></table></dt>
|
||||
@@ -135,7 +136,7 @@ Used to set the number of capture or playback channels. Common values are: 1 = m
|
||||
and 6 = full 6 channel audio. Few sound cards support more than 2 channels
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-11' xml:id='l2h-11' class="method">setrate</tt></b>(</nobr></td>
|
||||
<td><var>rate</var>)</td></tr></table></dt>
|
||||
@@ -144,7 +145,7 @@ Set the sample rate in Hz for the device. Typical values are 8000 (poor sound),
|
||||
and 96000
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-12' xml:id='l2h-12' class="method">setformat</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -152,7 +153,7 @@ and 96000
|
||||
The sound format of the device. Sound format controls how the PCM device interpret data for playback,
|
||||
and how data is encoded in captures.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The following formats are provided by ALSA:
|
||||
<div class="center"><table class="realtable">
|
||||
<thead>
|
||||
@@ -162,58 +163,58 @@ The following formats are provided by ALSA:
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_S8</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_S8</formats></td>
|
||||
<td class="left" >Signed 8 bit samples for each channel</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_U8</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_U8</formats></td>
|
||||
<td class="left" >Signed 8 bit samples for each channel</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_S16_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_S16_LE</formats></td>
|
||||
<td class="left" >Signed 16 bit samples for each channel (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_S16_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_S16_BE</formats></td>
|
||||
<td class="left" >Signed 16 bit samples for each channel (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_U16_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_U16_LE</formats></td>
|
||||
<td class="left" >Unsigned 16 bit samples for each channel (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_U16_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_U16_BE</formats></td>
|
||||
<td class="left" >Unsigned 16 bit samples for each channel (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_S24_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_S24_LE</formats></td>
|
||||
<td class="left" >Signed 24 bit samples for each channel (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_S24_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_S24_BE</formats></td>
|
||||
<td class="left" >Signed 24 bit samples for each channel (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_U24_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_U24_LE</formats></td>
|
||||
<td class="left" >Unsigned 24 bit samples for each channel (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_U24_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_U24_BE</formats></td>
|
||||
<td class="left" >Unsigned 24 bit samples for each channel (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_S32_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_S32_LE</formats></td>
|
||||
<td class="left" >Signed 32 bit samples for each channel (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_S32_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_S32_BE</formats></td>
|
||||
<td class="left" >Signed 32 bit samples for each channel (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_U32_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_U32_LE</formats></td>
|
||||
<td class="left" >Unsigned 32 bit samples for each channel (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_U32_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_U32_BE</formats></td>
|
||||
<td class="left" >Unsigned 32 bit samples for each channel (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_FLOAT_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_FLOAT_LE</formats></td>
|
||||
<td class="left" >32 bit samples encoded as float. (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_FLOAT_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_FLOAT_BE</formats></td>
|
||||
<td class="left" >32 bit samples encoded as float (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_FLOAT64_LE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_FLOAT64_LE</formats></td>
|
||||
<td class="left" >64 bit samples encoded as float. (Little Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_FLOAT64_BE</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_FLOAT64_BE</formats></td>
|
||||
<td class="left" >64 bit samples encoded as float. (Big Endian byte order)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_MU_LAW</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_MU_LAW</formats></td>
|
||||
<td class="left" >A logarithmic encoding (used by Sun .au files)</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_A_LAW</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_A_LAW</formats></td>
|
||||
<td class="left" >Another logarithmic encoding</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_IMA_ADPCM</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_IMA_ADPCM</formats></td>
|
||||
<td class="left" >a 4:1 compressed format defined by the Interactive Multimedia Association</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_MPEG</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_MPEG</formats></td>
|
||||
<td class="left" >MPEG encoded audio?</td></tr>
|
||||
<tr><td class="left" valign="baseline"><Formats>PCM_FORMAT_GSM</Formats></td>
|
||||
<tr><td class="left" valign="baseline"><formats>PCM_FORMAT_GSM</formats></td>
|
||||
<td class="left" >9600 constant rate encoding well suitet for speech</td></tr></tbody>
|
||||
</table></div>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-13' xml:id='l2h-13' class="method">setperiodsize</tt></b>(</nobr></td>
|
||||
<td><var>period</var>)</td></tr></table></dt>
|
||||
@@ -223,7 +224,7 @@ each read will return this number of frames (unless the device is in PCM_NONBLOC
|
||||
it may return nothing at all)
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-14' xml:id='l2h-14' class="method">read</tt></b>(</nobr></td>
|
||||
<td><var></var>)</td></tr></table></dt>
|
||||
@@ -233,12 +234,12 @@ tuple (length,data) where <em>length</em> is the size in bytes of the captured d
|
||||
is the captured sound frames as a string. The length of the returned data will be periodsize*framesize
|
||||
bytes.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
In PCM_NONBLOCK mode, the call will not block, but will return <code>(0,'')</code> if no new period
|
||||
has become available since the last call to read.
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
|
||||
<td><nobr><b><tt id='l2h-15' xml:id='l2h-15' class="method">write</tt></b>(</nobr></td>
|
||||
<td><var>data</var>)</td></tr></table></dt>
|
||||
@@ -247,67 +248,67 @@ Writes (plays) the sound in data. The length of data <em>must</em> be a multiple
|
||||
<em>should</em> be exactly the size of a period. If less than 'period size' frames are provided, the actual
|
||||
playout will not happen until more data is written.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
If the device is not in PCM_NONBLOCK mode, this call will block if the kernel buffer is full, and
|
||||
until enough sound has been played to allow the sound data to be buffered. The call always returns
|
||||
the size of the data provided
|
||||
|
||||
<P>
|
||||
<p>
|
||||
In PCM_NONBLOCK mode, the call will return immediately, with a return value of zero, if the buffer is
|
||||
full. In this case, the data should be written at a later time.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
</dl>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
<strong>A few hints on using PCM devices for playback</strong>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The most common reason for problems with playback of PCM audio, is that the people don't properly understand
|
||||
that writes to PCM devices must match <em>exactly</em> the data rate of the device.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
If too little data is written to the device, it will underrun, and ugly clicking sounds will occur. Conversely,
|
||||
of too much data is written to the device, the write function will either block (PCM_NORMAL mode) or return zero
|
||||
(PCM_NONBLOCK mode).
|
||||
|
||||
<P>
|
||||
<p>
|
||||
If your program does nothing, but play sound, the easiest way is to put the device in PCM_NORMAL mode, and just
|
||||
write as much data to the device as possible. This strategy can also be achieved by using a separate thread
|
||||
with the sole task of playing out sound.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
In GUI programs, however, it may be a better strategy to setup the device, preload the buffer with a few
|
||||
periods by calling write a couple of times, and then use some timer method to write one period size of data to
|
||||
the device every period. The purpose of the preloading is to avoid underrun clicks if the used timer
|
||||
doesn't expire exactly on time.
|
||||
|
||||
<P>
|
||||
Also note, that most timer API's that you can find for Python will cummulate time delays: If you set the timer
|
||||
<p>
|
||||
Also note, that most timer APIs that you can find for Python will cummulate time delays: If you set the timer
|
||||
to expire after 1/10'th of a second, the actual timeout will happen slightly later, which will accumulate to
|
||||
quite a lot after a few seconds. Hint: use time.time() to check how much time has really passed, and add
|
||||
extra writes as nessecary.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><a rel="prev" title="4.1 PCM Terminology and"
|
||||
<td class='online-navigation'><a rel="prev" title="4.1 pcm Terminology and"
|
||||
href="node7.html"><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Previous Page' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="parent" title="4 alsaaudio"
|
||||
href="module-alsaaudio.html"><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></A></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.3 Mixer Objects"
|
||||
border='0' height='32' alt='Up one Level' width='32' /></a></td>
|
||||
<td class='online-navigation'><a rel="next" title="4.3 mixer Objects"
|
||||
href="mixer-objects.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -315,17 +316,17 @@ extra writes as nessecary.
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Previous:</b>
|
||||
<a class="sectref" rel="prev" href="node7.html">4.1 PCM Terminology and</A>
|
||||
<a class="sectref" rel="prev" href="node7.html">4.1 PCM Terminology and</a>
|
||||
<b class="navlabel">Up:</b>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</A>
|
||||
<a class="sectref" rel="parent" href="module-alsaaudio.html">4 alsaaudio</a>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="mixer-objects.html">4.3 Mixer Objects</A>
|
||||
<a class="sectref" rel="next" href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
doc/previous.png
Normal file
|
After Width: | Height: | Size: 511 B |
@@ -7,25 +7,26 @@
|
||||
<link rel='last' href='about.html' title='About this document...' />
|
||||
<link rel='help' href='about.html' title='About this document...' />
|
||||
<link rel="next" href="front.html" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name='aesop' content='information' />
|
||||
<title>PyAlsaAudio</title>
|
||||
</head>
|
||||
<body>
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td class='online-navigation'><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></td>
|
||||
<td class='online-navigation'><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></td>
|
||||
<td class='online-navigation'><a rel="next" title="Front Matter"
|
||||
href="front.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -33,49 +34,48 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</A>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</a>
|
||||
</div>
|
||||
<hr /></div>
|
||||
</DIV>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
<div class="titlepage">
|
||||
<div class='center'>
|
||||
<h1>PyAlsaAudio</h1>
|
||||
<p><b><font size="+2">Casper Wilstrup</font></b></p>
|
||||
<p>cwi@unispeed.com</p>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
|
||||
<p><br /></p><hr class='online-navigation' />
|
||||
<div class='online-navigation'>
|
||||
<!--Table of Child-Links-->
|
||||
<A NAME="CHILD_LINKS"></a>
|
||||
<a name="CHILD_LINKS"></a>
|
||||
|
||||
<UL CLASS="ChildLinks">
|
||||
<LI><A href="front.html">Front Matter</a>
|
||||
<LI><A href="contents.html">Contents</a>
|
||||
<UL>
|
||||
<LI><A href="node3.html">1 What is ALSA</a>
|
||||
<LI><A href="node4.html">2 ALSA and Python</a>
|
||||
<LI><A href="node5.html">3 Installation</a>
|
||||
<LI><A href="module-alsaaudio.html">4 <tt class="module">alsaaudio</tt></a>
|
||||
<UL>
|
||||
<LI><A href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<LI><A href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<LI><A href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<LI><A href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
<ul class="ChildLinks">
|
||||
<li><a href="front.html">Front Matter</a>
|
||||
<li><a href="contents.html">Contents</a>
|
||||
<ul>
|
||||
<li><a href="node3.html">1 What is ALSA</a>
|
||||
<li><a href="node4.html">2 ALSA and Python</a>
|
||||
<li><a href="node5.html">3 Installation</a>
|
||||
<li><a href="module-alsaaudio.html">4 <tt class="module">alsaaudio</tt></a>
|
||||
<ul>
|
||||
<li><a href="node7.html">4.1 PCM Terminology and Concepts</a>
|
||||
<li><a href="pcm-objects.html">4.2 PCM Objects</a>
|
||||
<li><a href="mixer-objects.html">4.3 Mixer Objects</a>
|
||||
<li><a href="pcm-example.html">4.4 ALSA Examples</a>
|
||||
</ul>
|
||||
</ul>
|
||||
<LI><A href="about.html">About this document ...</a>
|
||||
<li><a href="about.html">About this document ...</a>
|
||||
</ul>
|
||||
<!--End of Table of Child-Links-->
|
||||
</div>
|
||||
|
||||
<DIV CLASS="navigation">
|
||||
<div class="navigation">
|
||||
<div class='online-navigation'>
|
||||
<p></p><hr />
|
||||
<table align="center" width="100%" cellpadding="0" cellspacing="2">
|
||||
@@ -83,14 +83,14 @@
|
||||
<td class='online-navigation'><img src='previous.png'
|
||||
border='0' height='32' alt='Previous Page' width='32' /></td>
|
||||
<td class='online-navigation'><img src='up.png'
|
||||
border='0' height='32' alt='Up One Level' width='32' /></td>
|
||||
border='0' height='32' alt='Up one Level' width='32' /></td>
|
||||
<td class='online-navigation'><a rel="next" title="Front Matter"
|
||||
href="front.html"><img src='next.png'
|
||||
border='0' height='32' alt='Next Page' width='32' /></A></td>
|
||||
border='0' height='32' alt='Next Page' width='32' /></a></td>
|
||||
<td align="center" width="100%">PyAlsaAudio</td>
|
||||
<td class='online-navigation'><a rel="contents" title="Table of Contents"
|
||||
href="contents.html"><img src='contents.png'
|
||||
border='0' height='32' alt='Contents' width='32' /></A></td>
|
||||
border='0' height='32' alt='Contents' width='32' /></a></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
border='0' height='32' alt='' width='32' /></td>
|
||||
<td class='online-navigation'><img src='blank.png'
|
||||
@@ -98,13 +98,13 @@
|
||||
</tr></table>
|
||||
<div class='online-navigation'>
|
||||
<b class="navlabel">Next:</b>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</A>
|
||||
<a class="sectref" rel="next" href="front.html">Front Matter</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<span class="release-info">Release 0.2.</span>
|
||||
</DIV>
|
||||
<span class="release-info">Release 0.3.</span>
|
||||
</div>
|
||||
<!--End of Navigation Panel-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
doc/pyfav.png
Normal file
|
After Width: | Height: | Size: 240 B |
@@ -5,7 +5,8 @@
|
||||
#
|
||||
# You also need a working latex installation, and the latex2html
|
||||
# tool installed.
|
||||
PYTHONSOURCE = /usr/src/Python-2.4.1/
|
||||
PYTHONSOURCE = /usr/local/src/Python-2.5.1/
|
||||
SFUSER = larsimmisch
|
||||
|
||||
# Shouldn't need to change anything below here!
|
||||
|
||||
@@ -13,8 +14,10 @@ MKHOWTO = $(PYTHONSOURCE)/Doc/tools/mkhowto
|
||||
|
||||
all:
|
||||
$(MKHOWTO) --dir .. --html pyalsaaudio.tex
|
||||
python sffixup.py ../index.html
|
||||
|
||||
text:
|
||||
$(MKHOWTO) --dir .. --text pyalsaaudio.tex
|
||||
|
||||
|
||||
install:
|
||||
scp ../*.html ../*.gif ../*.png $(SFUSER)@shell.sourceforge.net:/home/groups/p/py/pyalsaaudio/htdocs
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
\platform{Linux}
|
||||
|
||||
\moduleauthor{Casper Wilstrup}{cwi@unispeed.com} % Author of the module code;
|
||||
\moduleauthor{Casper Wilstrup} % {cwi@aves.dk} % Author of the module code;
|
||||
|
||||
|
||||
\modulesynopsis{ALSA sound support}
|
||||
@@ -31,7 +31,7 @@ ALSA.
|
||||
\begin{funcdesc}{mixers}{\optional{cardname}}
|
||||
List the available mixers. The optional \var{cardname} specifies which
|
||||
card should be queried (this is only relevant if you have more than one
|
||||
sound card). Omit to use the default sound card
|
||||
sound card). Omit to use the default sound card.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{classdesc}{PCM}{\optional{type}, \optional{mode}, \optional{cardname}}
|
||||
@@ -247,7 +247,7 @@ periods by calling write a couple of times, and then use some timer method to wr
|
||||
the device every period. The purpose of the preloading is to avoid underrun clicks if the used timer
|
||||
doesn't expire exactly on time.
|
||||
|
||||
Also note, that most timer API's that you can find for Python will cummulate time delays: If you set the timer
|
||||
Also note, that most timer APIs that you can find for Python will cummulate time delays: If you set the timer
|
||||
to expire after 1/10'th of a second, the actual timeout will happen slightly later, which will accumulate to
|
||||
quite a lot after a few seconds. Hint: use time.time() to check how much time has really passed, and add
|
||||
extra writes as nessecary.
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
\title{PyAlsaAudio}
|
||||
|
||||
\release{0.2}
|
||||
\release{0.3}
|
||||
|
||||
% At minimum, give your name and an email address. You can include a
|
||||
% snail-mail address if you like.
|
||||
\author{Casper Wilstrup}
|
||||
\authoraddress{cwi@unispeed.com}
|
||||
% Commented out for now - Lars
|
||||
% \authoraddress{cwi@aves.dk}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
@@ -29,13 +30,13 @@ whatsoever.
|
||||
% scope of the document.
|
||||
\begin{abstract}
|
||||
\noindent
|
||||
This package contains wrappers for accessing the ALSA api from Python. It
|
||||
This package contains wrappers for accessing the ALSA API from Python. It
|
||||
is currently fairly complete for PCM devices and Mixer access. MIDI sequencer
|
||||
support is low on my priority list, but volunteers are welcome.
|
||||
|
||||
If you find bugs in the wrappers please notify me on email. Please
|
||||
If you find bugs in the wrappers please use the SourceForge bug tracker. Please
|
||||
don't send bug reports regarding ALSA specifically. There are several
|
||||
bugs in this api, and those should be reported to the ALSA team - not
|
||||
bugs in this API, and those should be reported to the ALSA team - not
|
||||
me.
|
||||
\end{abstract}
|
||||
|
||||
|
||||
35
doc/src/sffixup.py
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env/python
|
||||
|
||||
# This is a hack and totally brittle. Let's not talk about it.
|
||||
|
||||
import sys
|
||||
|
||||
sfnotes = '''<ul>
|
||||
<li><a href="http://sourceforge.net/">SourceForge</li>
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/pyalsaaudio/">Summary page</a>
|
||||
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=120651">Download</a>
|
||||
<li><a href="http://sourceforge.net/tracker/?group_id=120651">Bug Tracker</a>
|
||||
</ul>
|
||||
</ul>'''
|
||||
|
||||
if len(sys.argv) <= 1:
|
||||
print "usage: sffixup.py <file>"
|
||||
sys.exit(2)
|
||||
|
||||
f = open(sys.argv[1], 'r')
|
||||
lines = f.readlines()
|
||||
f.close()
|
||||
|
||||
try:
|
||||
index = lines.index('<a name="CHILD_LINKS"></a>\n')
|
||||
except ValueError:
|
||||
print "Cannot find child links. SourceForge links will not appear on index.html."
|
||||
sys.exit(1)
|
||||
|
||||
lines.insert(index, sfnotes)
|
||||
|
||||
f = open(sys.argv[1], 'w')
|
||||
for l in lines:
|
||||
f.write(l)
|
||||
f.close()
|
||||
BIN
doc/up.png
Normal file
|
After Width: | Height: | Size: 577 B |
46
setup.py
@@ -1,14 +1,42 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''This package contains wrappers for accessing the ALSA API from Python.
|
||||
It is fairly complete for PCM devices and Mixer access.
|
||||
'''
|
||||
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from sys import version
|
||||
|
||||
# patch distutils if it can't cope with the "classifiers" or
|
||||
# "download_url" keywords
|
||||
from sys import version
|
||||
if version < '2.2.3':
|
||||
from distutils.dist import DistributionMetadata
|
||||
DistributionMetadata.classifiers = None
|
||||
DistributionMetadata.download_url = None
|
||||
|
||||
setup(
|
||||
name = "alsaaudio",
|
||||
version = "0.1",
|
||||
description = "alsa bindings",
|
||||
author = "Casper Wilstrup",
|
||||
author_email="cwi@unispeed.com",
|
||||
ext_modules=[Extension("alsaaudio",["alsaaudio.c"],libraries=['asound'])
|
||||
]
|
||||
name = 'pyalsaaudio',
|
||||
version = '0.3',
|
||||
description = 'ALSA bindings',
|
||||
long_description = __doc__,
|
||||
author = 'Casper Wilstrup',
|
||||
author_email='cwi@aves.dk',
|
||||
# maintainer = 'Lars Immisch',
|
||||
# maintainer_email = 'lars@ibp.de',
|
||||
license='PSF',
|
||||
platforms=['posix'],
|
||||
url='http://pyalsaaudio.sourceforge.net/',
|
||||
classifiers = [
|
||||
'Development Status :: 4 - Beta',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: Python Software Foundation License',
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Topic :: Multimedia :: Sound/Audio',
|
||||
'Topic :: Multimedia :: Sound/Audio :: Mixers',
|
||||
'Topic :: Multimedia :: Sound/Audio :: Players',
|
||||
'Topic :: Multimedia :: Sound/Audio :: Capture/Recording',
|
||||
],
|
||||
ext_modules=[Extension('alsaaudio',['alsaaudio.c'],libraries=['asound'])]
|
||||
)
|
||||
|
||||
|
||||
|
||||