Interesting. I'd seen the sound.getODevices() call before but that only gets a list of devices. On close inspection of the example you linked to it looks like the sound card is an option when playing: snd=3Dsound.Output( int( r.sample_rate* rate ), r.channels, sound.AFMT_S16_LE, card ) In the basic tutorial I'd seen before it did not show the "card" option: sampleRate=3D f.getframerate() channels=3D f.getnchannels() format=3D sound.AFMT_S16_LE snd1=3D sound.Output( sampleRate, channels, format ) Thanks for your help. Bob On Mon, Jul 22, 2013, at 10:05 AM, Alex Harford wrote: > The PyMedia example player seems to let you choose the card: >=20 > http://pymedia.org/tut/src/aplayer.py.html >=20 > See the call to 'sound.getODevices()' > http://pymedia.org/docs/pymedia.audio.sound.html#-getODevices >=20 > On Mon, Jul 22, 2013 at 8:59 AM, Bob Blick wrote: > > I'm trying to do a simple audio playback with Python through an > > alternate sound card (generic usb audio device) but it seems most of th= e > > easy libraries (PyMedia, PyGame, PyAudio) for playing sound in Python > > don't have that capability, they all play through the default audio > > device. > > > > This is for Linux and doesn't need to be portable, but it should be > > simple because I'm not too smart where Python or Linux is involved. I'm > > doing this project to improve my Python chops and make a Halloween type > > of sound and light effect display at home. I already have a Linux box > > running all the time near it so that's why I'm doing it this way. > > > > I did find this method but from my untrained eye it looks like it > > bypasses the sound server. But maybe that's OK in this case, nothing > > else will be accessing the usb audio device and system sounds will play > > through the default device as normal: > > > > http://bytes.com/topic/python/answers/37418-how-play-sound-python > > > > Any comments would be welcome though, since I'm clueless :) > > > > Thanks! > > > > Bob --=20 http://www.fastmail.fm - mmm... Fastmail... --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .