I have some speakers that have an external headphones plug-in thingy. I'd like to be able to write a program (or download one, if such a program has already been written) that lets me switch from headphone output to speaker output - that is, I'd like to be able to hear sound out of the speakers, not out of the headphones, without having to unplug the headphones. However, I don't know how to go about doing this - I'm familiar with C and Java syntax, and can learn quickly anyways, so if anyone knows how to do this, please let me know!
Can't say without more details. It's probably not possible (usual disclaimer: without hardware modification).
In the unlikely event that the headphones and speakers appear as separate audio devices in the Sound control panel then plug in both, right-click the speakers device and select Set as Default Device. That way they will still be used if both speakers and headphones are plugged in (though no sound would come out of the headphones, naturally).

If they are not separate audio devices then it's probably something that's handled on the hardware level. You may be able to find some device-specific software to control this but I would find it unlikely.

May I enquire as to why you would want to do this? There may be a more practical solution, as it seems odd that the obvious answer ("unplug the headphones") is not suitable.
benryves wrote:
May I enquire as to why you would want to do this? There may be a more practical solution, as it seems odd that the obvious answer ("unplug the headphones") is not suitable.


Yeah, I don't know. Its more of a curiousity thing.
alsamixer

You can mute stuff separately from there.
seana11 wrote:
alsamixer

You can mute stuff separately from there.
As benryves said far more eloquently, if they're not separate devices, this isn't possible. For my fancy 5.1 Logitech speakers, the headphones and line-out are indeed two different devices, but for almost every set of stereo speakers, the headphone jack override is handled entirely in the hardware of the speaker, often a physical switch that you trigger when you plug in headphones. If you were clever, you could use a microcontroller as a USB device to control that switch, and write a little PC-side program to interface with said microcontroller.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement