Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python audio output switch

Reply
Thread Tools

Python audio output switch

 
 
Pan Xingzhi
Guest
Posts: n/a
 
      07-25-2006
Guys:

Hi there. Recently I'll have to write a quite interesting program
in Python on a Linux box. What I need is a function which allows the
user to 'switch' the audio output from <an audio
file>/<microphone>/<line in>.

I'm not quite familiar with Linux programming. I've checked some
python media frameworks but still need some light. Does anybody have
experience on this? Thanks in advance!

Regards,
Pan Xingzhi
 
Reply With Quote
 
 
 
 
Ben Sizer
Guest
Posts: n/a
 
      07-26-2006
Pan Xingzhi wrote:
> Guys:
>
> Hi there. Recently I'll have to write a quite interesting program
> in Python on a Linux box. What I need is a function which allows the
> user to 'switch' the audio output from <an audio
> file>/<microphone>/<line in>.


They are audio inputs, not audio outputs!

I don't know of any Python modules for this, though maybe one exists.
Most documentation is for C coders, and depends a lot upon what sound
system your distribution of Linux is running. If you are using OSS
(Open Sound System), you may be able to access /dev/mixer to choose
which device is the default input. (Although I am more used to systems
where you can read each input independently.) If so, you may find this
page gives you a few pointers:
http://www.oreilly.de/catalog/multil...pt/ch14-07.htm

If you are using something else, like ALSA, you may want to look at
their documentation. Or perhaps http://jackaudio.org/ will be of use.

--
Ben Sizer

 
Reply With Quote
 
 
 
 
Pan Xingzhi
Guest
Posts: n/a
 
      07-26-2006
Sorry maybe I didn't describe what I need clearly. Yes they're inputs.
Actually I need a switch to 'hook' them to line out so when I switch, a
mp3 file is played, or an external CD player is played, or what I'm
talking is played.

Thanks anyway. I'm checking ALSA, though maybe I'll have to write sth in
C

Ben Sizer wrote:
> Pan Xingzhi wrote:
>> Guys:
>>
>> Hi there. Recently I'll have to write a quite interesting program
>> in Python on a Linux box. What I need is a function which allows the
>> user to 'switch' the audio output from <an audio
>> file>/<microphone>/<line in>.

>
> They are audio inputs, not audio outputs!
>
> I don't know of any Python modules for this, though maybe one exists.
> Most documentation is for C coders, and depends a lot upon what sound
> system your distribution of Linux is running. If you are using OSS
> (Open Sound System), you may be able to access /dev/mixer to choose
> which device is the default input. (Although I am more used to systems
> where you can read each input independently.) If so, you may find this
> page gives you a few pointers:
> http://www.oreilly.de/catalog/multil...pt/ch14-07.htm
>
> If you are using something else, like ALSA, you may want to look at
> their documentation. Or perhaps http://jackaudio.org/ will be of use.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how mix multi-audio file to a audio file? aeonsun Java 2 03-11-2007 06:07 AM
use audio device to play recieved partial audio data sick dick Javascript 0 04-03-2006 04:47 AM
cannot playback audio strem, audio not available or hardware not responding chieyenne Computer Support 2 05-19-2005 07:01 PM
copying audio extras on dvd to audio CD? Mad Scientist Jr DVD Video 2 10-07-2004 03:17 PM
Any way to take the audio from a concert DVD to make audio files? NOT TO BE USED FOR PIRACY. Ant DVD Video 8 06-24-2004 05:52 AM



Advertisments