1

I have two audio outputs in my cpu. One is meant for speakers and the other for headphones.I want to create a program in which I can choose which program is allowed to play sound in which port. So that I can put headphones in one port, and play something on the speaker connected to another port. Currently the speaker in back port goes off if I connect earphones to the other port.

PS : Don't really know which tags to choose for this. Please suggest the right tags.

goodbytes
  • 428
  • 3
  • 8
  • 21
  • Too broad, specify at least the OS and the programming languages you are able to use. It looks like you'll need to explore the concept of `audio mixer` and you want to write a mixer `plugin` – xmojmr Apr 16 '15 at 16:58
  • 1
    I am currently using windows 8.1. If you could suggest something using java it would be great. I am also open for python, or even c, c++ (I am looking at JNI). Anything. Tell me the approach. – goodbytes Apr 16 '15 at 17:59

1 Answers1

1

I don't know what would be the correct final solution, haven't worked with the sound APIs involving other applications (manipulating sound output options of a 3rd party closed-source application) and I'm not sure if it is generally supported scenario. But some tips to get you started might be:

  • 1. web search queries - that is what I used to "quickly" find the other tips:
    • application specific audio output
    • windows open source application specific audio output
    • windows audio mixer api
    • open source configurable audio mixer for windows
  • MSDN: Windows → Dev Center - Desktop → Audio Mixer Reference - this is probably the basic stuff you should learn, but probably the most low-level with steep learning curve
  • Super User: Assigning programs to specific audio outputs in Windows 7 - this is probably some ready-to-buy solution
  • SoundSwitch - open source, something to study/tweak - "With SoundSwitch you just configure once between which Playback devices you want to toggle and then you can press Ctrl+Alt+F11 to toggle automatically"
  • JACK Audio Connection Kit - open source - "JACK on Windows is a multi-purpose application that connects audio and MIDI using the Windows system drivers... It connects (OUTPUT) to those audio drivers using the PortAudio project"
Community
  • 1
  • 1
xmojmr
  • 8,073
  • 5
  • 31
  • 54