PDA

View Full Version : Audio switch


Keef
14th Mar 2008, 14:34
A very long shot, this...

I'm an owl, married to a lark. She often turns in around 9pm. I'm usually more around 2 am. To prevent the noises-off from my computer disturbing her kip (she can hear a pooter beep from the other end of the house through several closed doors), I have a timeswitch on the power supply to the speakers. That shuts them off at 10 pm.

That works well, but it means that after 10pm if I want to listen to anything, I have to go into the Audio Properties panel and switch to "USB Headset". Anything running at the time (ie the program I started before I realised) then has to be shut down and restarted.

So ... the question:

Is there a way to set up an automatic "software switch" to change from Speakers to Headset at 10pm?

If all else fails, I'll do a job with a relay in the speaker line.

Bushfiva
14th Mar 2008, 15:05
Something like Automation Tools or Winbatch might do what you want. Once you've found them, you'll find other scripting programs, too. I've even used Outlook to run scripts at a set time each day/week.

Keef
14th Mar 2008, 16:06
They look as if they may do the job - but GULP! the price!!

I can stick in a relay and a headphone socket on the speakers to connect when the power is off, for a tiny fraction of $100.

I'll see if I can write a bit of code to do the job (PROB10 of succeeding, though).

green granite
14th Mar 2008, 16:15
Errrrr my mc switches from speakers to usb headphones as soon as I plug them in. (XP)

Keef
14th Mar 2008, 21:03
Mine are all permanently connected. The problem comes at 10pm when the speakers turn into pumpkins. It looks like a relay in the speaker enclosure and a stereo jack socket on the outside is the fix.

vapilot2004
15th Mar 2008, 02:22
Hello Keef,

Try this mute utility (from a trusted source) http://edmullen.net/utility/mute.exe
or access Ed's utility page here. (http://edmullen.net/utility.php) The utility was featured in a PC magazine article some time ago. It's a toggle - each run inverts the mute status. Place the mute.exe program in your Windows/System32 folder.

Now you can open control panel and run Task Scheduler from there to add the task location and time or if typing cryptic command lines are your idea of fun around the computer, try the following in the Start > Run dialog: :8

schtasks /create /tn mute /tr mute.exe /sc DAILY /st 22:00:00 /ru System

Switches:
/tn Task name - arbitrary
/tr Task program name - if located in your system32 directory, no path needed otherwise type the full path to the location of your program to run
/sc Schedule type - in our case, daily
/st Start time
/ru - Runs as user - the word system runs command as current user

You can see all of the switches and options by typing schtasks /? or searching Windows help for schtasks.

This will create a recurring task every day when the computer is running at 10pm to mute the speakers. By changing the task name and start time, you can un-mute the speakers in the morning the same way. To view scheduled tasks, open a command line (type CMD in the Run window) and type schtasks.

Chances are fair to good that the USB headphones can similarly be controlled via a built-in app that can be run with a command line switch.


Best of Luck!

If you create a shortcut to mute.exe on your desktop or quick launch bar, you have 1 click access to the mute function of the PC sound card.

***Please note: Since mute.exe is a toggle, speakers will be ON if they were OFF when the task runs. :eek:

Keef
15th Mar 2008, 20:40
Thanks, vapilot. A very useful set of info. I'll have a play!

What I'll need to "invent" is the toggle to switch between speakers and USB headset. That should keep me out of mischief for a bit.

dazdaz
15th Mar 2008, 21:43
Hi Keef
Just an idea??? How about turning the volume down on your monitor/speakers.

Daz

Keef
16th Mar 2008, 00:08
M has super-sensitive hearing. It's OFF or HEADPHONES. No other option.

Tarq57
16th Mar 2008, 03:47
What an extreme degree of hassle to have to go to. Clearly Mrs Keef didn't attend enough rock concerts when younger.
How about one of these? (http://www.naturestapestry.com/generator.html)

Keef
16th Mar 2008, 15:09
Nice thought, but I suspect not.
We met at primary school when she was 4 and I was 5. Courtship was in the Church choir (she sang alto, I croaked bass). We're Mozart/Bach people, not rock. Her hearing is impressive (when she wants to hear, or wants silence).

Anyway, this laptop now has "speakers off at 10pm/on at 8 am", all automated, thanks to vapilot.
I think my soldering iron is coming out for the main machine back in Essex.

Saab Dastard
16th Mar 2008, 15:48
We're Mozart/Bach people, not rock

On the contrary, Bach ROCKS! And so does Mozart!

:ok:

SD