<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on article "ALSA Pythonized"</title>
<link>http://base-art.net/Articles/6/</link>
<description>&lt;p&gt;In &lt;a class="reference" href="http://respyre.org"&gt;ResPyre&lt;/a&gt; project context, &lt;a class="reference" href="http://respyre.org/reg.html"&gt;Regis Prevot&lt;/a&gt; wrote a python binding
for &lt;a class="reference" href="http://alsa-project.org"&gt;ALSA&lt;/a&gt;. Because I believe his work could be usefull for other
developpers, here is a first version of &lt;a class="reference" href="http://respyre.org/pyalsa.html"&gt;alsamodule&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This first version supports ALSA mixer. You can get, change, mute,
unmute volume on audio channels. Here is a little example:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
&amp;gt;&amp;gt;&amp;gt; import alsa
&amp;gt;&amp;gt;&amp;gt; mixer = alsa.mixer(&amp;quot;default&amp;quot;)
&amp;gt;&amp;gt;&amp;gt; mixer.printInfo()
            **********************
Card Id:                        default
Mixer Card Name:                Intel 82801DB-ICH4
Mixer Device Name:              SigmaTel STAC9750/51,0x42434d64 BCM
Max Volume:                     -1
Min Volume:                     -1
Incremental value min:          -1.00
Number of Elements:             22
            **********************
&amp;gt;&amp;gt;&amp;gt; print mixer.channels.keys()
['Capture', 'Mic', 'Mono Output Select', 'Mix', 
 'Master', 'PCM', 'Aux', 'External Amplifier', 
 '3D Control - Switch', 'Phone', 'PC Speaker', 
 'Line', 'Mic Select', 'CD', '3D Control - Depth', 
 'Master Mono', 'Mix Mono', 'Mic Boost (+20dB)', 
 'Headphone', 'Video', '3D Control - Center', 
 'PCM Out Path &amp;amp; Mute']
&amp;gt;&amp;gt;&amp;gt; print &amp;quot;get volume for device PCM&amp;quot;
get volume for device PCM
&amp;gt;&amp;gt;&amp;gt; print mixer.getVolume(&amp;quot;PCM&amp;quot;)
(45, 45)
&amp;gt;&amp;gt;&amp;gt; print mixer.setVolume(&amp;quot;PCM&amp;quot;, 3, 3)
(48, 48)
&lt;/pre&gt;
&lt;p&gt;The binding is written in C, and has been tested under Linux. A
&lt;cite&gt;setup.py&lt;/cite&gt; file should come shortly. Until then use the Makefile to
build the thing.&lt;/p&gt;
&lt;p&gt;Any feedback is welcome.&lt;/p&gt;
</description>
<language>en</language>
<copyright>The contents of this blog are available for non-commercial use only.</copyright>
<generator>Alinea http://pythonfr.org/alinea/</generator>



</channel>
</rss>
