The program is subdivided in two talking parts: the first, in C, reads a potentiometer installed on the Arduino board and via-serialport tells the other part, a python script, the current volume level. Then the python script calls aumix to set the audio card volume.
All the code is under GPL, and you can get it from
http://shared.hackzine.org/progetti/arduino/volumeChanger_20081003-025910.tbz2.
The volumeChanger.pde file is the arduino program source code, and pyclient/volumeChanger_pyclient.py is the python script to run on the host machine. To talk on serial port with python you'll need the module pyserial installed.
The hardware configuration is quite simple: a potentiometer is plugged on arduino as follows: