Audio switch
Thread Starter
Official PPRuNe Chaplain
Joined: Apr 2001
Posts: 3,498
Likes: 0
From: Witnesham, Suffolk
Audio switch
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.
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.
Hippopotomonstrosesquipidelian title
Joined: Oct 2006
Posts: 1,825
Likes: 1
From: is everything
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.
Thread Starter
Official PPRuNe Chaplain
Joined: Apr 2001
Posts: 3,498
Likes: 0
From: Witnesham, Suffolk
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).
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).
Thread Starter
Official PPRuNe Chaplain
Joined: Apr 2001
Posts: 3,498
Likes: 0
From: Witnesham, Suffolk
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.
Joined: Aug 2005
Posts: 1,693
Likes: 0
From: fairly close to the colonial capitol
Hello Keef,
Try this mute utility (from a trusted source) http://edmullen.net/utility/mute.exe
or access Ed's utility page here. 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:
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.
Try this mute utility (from a trusted source) http://edmullen.net/utility/mute.exe
or access Ed's utility page here. 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:

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.
Last edited by vapilot2004; 15th March 2008 at 02:38.
Thread Starter
Official PPRuNe Chaplain
Joined: Apr 2001
Posts: 3,498
Likes: 0
From: Witnesham, Suffolk
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.
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.
Thread Starter
Official PPRuNe Chaplain
Joined: Apr 2001
Posts: 3,498
Likes: 0
From: Witnesham, Suffolk
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.
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.





