Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

switch between headphones <-> speakers


  • Please log in to reply
21 replies to this topic
Vrokolos
  • Members
  • 5 posts
  • Last active: Jan 10 2009 09:43 PM
  • Joined: 02 Apr 2008
Yes I know.. that's whay I'm looking at:
IDirectsound.SetSpeakerConfig

DirectSound
  • Guests
  • Last active:
  • Joined: --
Here it is.
setting := 4	; 1: Headphone, 4: Stereo, 8: 7.1 Surround, etc.

DllCall("dsound\DirectSoundCreate8", "Uint", 0, "UintP", pds, "Uint", 0)
DllCall(NumGet(NumGet(1*pds)+36), "Uint", pds, "Uint", setting)
DllCall(NumGet(NumGet(1*pds)+ 8), "Uint", pds)


wtg
  • Members
  • 251 posts
  • Last active: Dec 19 2012 03:54 PM
  • Joined: 04 Oct 2006
Thanks for providing that... works great! Always amazed what you can accomplish in AutoHotkey with so little code.

Murp-e
  • Members
  • 531 posts
  • Last active: Sep 27 2011 11:44 AM
  • Joined: 12 Jan 2007
Thanks for the scripts guys, they both worked well for me, but I came here looking for something a little different. The settings changed here are completely new to me, I had no idea the OS had different settings for Headphones, desktop speakers etc. I know Winamp has similar settings and if I'm not feeling too lazy I will switch those.

I constantly switch between using my headphones and my desktop speakers and everytime I switch I need to plugin or plugout my headphones. Does anyone know if there's a way of making the switch without having to physically disconnect the headphone cable? It would be much better to leave the headphones plugged in at all times and simply switch by using a hotkey or running a program.

Vrokolos
  • Members
  • 5 posts
  • Last active: Jan 10 2009 09:43 PM
  • Joined: 02 Apr 2008

Does anyone know if there's a way of making the switch without having to physically disconnect the headphone cable?


The way I did it requires two soundcards. I hooked up the headphones on one of them and the speakers on the other. I use quicksoundswitch to switch between those soundcards.

Murp-e
  • Members
  • 531 posts
  • Last active: Sep 27 2011 11:44 AM
  • Joined: 12 Jan 2007
Thanks for the advice Vrokolos, I was hoping for a simpler solution though! I read there may be a physical switch in the hardware where the cable connects, which is either on or off. So on certain computers I guess this is impossible to toggle using software. I'll remember your trick when I get a new PC though.

  • Guests
  • Last active:
  • Joined: --
<!-- m -->http://electronicsusa.com/mk5.html<!-- m -->