PDA

View Full Version : [SOLVED] Karmic 9.10 - Change sound device using bash (Script)



fatality_uk
June 2nd, 2010, 08:37 PM
I have a USB phone (Freshtel FT-102 VOIP USB Phone) which I would like to use. It works fine as long as I go into the Sound Preferences and manually change the input and output device.

However, my wife would like to use SKYPE as well to call home so I would like to create a script which will switch the input and output devices for the FT-102, start SKYPE and grab the PID for it, monitor it and when that PID is released, switch back the audio devices.

I should be able to do the getting the PID bit (Google being our friend here) but the audio hardware switching eludes me.

Anyone offer any suggestions please?

fatality_uk
June 3rd, 2010, 08:43 AM
I am going to bump this cos I KNOW there are much smarter people then me out there who can do this ;)

fatality_uk
June 10th, 2010, 07:39 PM
Just wondering if anyone might be bale to shed light on this?

Thanks

fatality_uk
June 18th, 2010, 02:13 PM
100+ views, not one answer. RIGHT!!

http://www.printedclothing.com/contents/media/pc425%20youre%20fired%20alan%20sugar.jpg

Sef
June 18th, 2010, 02:59 PM
100+ views, not one answer. RIGHT!!

Then the one who would have the answer has not seen your thread then. Sometimes, it takes longer than you want for the right person to come along.

fatality_uk
June 18th, 2010, 03:08 PM
Then the one who would have the answer has not seen your thread then. Sometimes, it takes longer than you want for the right person to come along.

I know! It was nothing but a shameless bump :oops:
As was this, wait I better stop now :)

gentleStu
June 22nd, 2010, 11:28 AM
Hi there,

it's not exactly what you're looking for, but you might find the script in http://ubuntuforums.org/showthread.php?t=1370383 helpful for examples of switching audio devices. It works for me in Lucid switching between a USB headset and the standard audio (though n.b. I needed to 'apt-get install notify-bin' to fix the reference to notify-send).

hope this helps

Stuart

fatality_uk
July 23rd, 2010, 03:25 PM
Hi Stu, thanks for that but actually my wife solved this rather difficult problem quite simply.

I had been coding with Python, bash etc to try and solve this and one day I heard her on the USB phone and then 5 minutes later watching YouTube.

Puzzled, I asked how the heck she managed to switch the audio devices in the "sound manager" to re-enable the SoundCard.




I JUST UNPLUGGED THE PHONE AND YOUTUBE WORKED!





*sigh......