Painkiller Posted August 12, 2010 Share Posted August 12, 2010 I looked through some other posts and found that a guy was changing his sound card for Audio. Well i have two cards for voice input. I use one for sound overs (it loops the in feed so i can play sound effects in games and cool stuff like that and yes that part of the program is done and over with some time ago). The other sound card handles my actual voice. The problem is, i cant change between the cards in game, so i decided to try and make a registry changer that allows me to change the voice options for the sound cards (like change from card A to card B for input). The Output will remain the same, however the input must change to the desired card. So far i have come up with: (by other posts that i have read) HotKeySet("^s","change") HotKeySet("^q","term") $card1 = "Realtek HD Audio input" $card2 = "Microsoft LifeCam VX-3000." $current = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","ConsoleVoiceComRecord") While 1 Sleep(30) WEnd Func term() Exit(1) EndFunc Func change() if $current = $card1 Then $current = $card2 RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","Record","REG_SZ",$card2) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","ConsoleVoiceComRecord","REG_SZ",$card2) Else $current = $card1 RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","Record","REG_SZ",$card1) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","ConsoleVoiceComRecord","REG_SZ",$card1) EndIf $currentCard = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","Record") $currentCard2 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","ConsoleVoiceComRecord") MsgBox(64,"Soundcard","The currently used Soundcard is: "& $currentCard & " : " & $currentCard2) EndFunc Now this code changes the registry strings to the proper sound cards. As you can see i am using a Realtek and a Microsoft Cam for my inputs. The problem is, once the registry values are changed, nothing happens (and I'm assuming thats due to the computer needs restarted for the new values to take place). But i know in windows xp(thats what this is for), you can go into "Sounds and Audio Devices" and change between the two without restarting the computer. Is there some sort of .dll i must call and wait for? I read a post about changing the wallpaper and having to run a .dll file to by-pass a restart, is that possible in my case too? I obviously need the changes to take effect without restart and without any dialogs showing up as this will be running while a game is running, but for test purposes i am only testing using the sound recorder that windows provides! Any help is greatly appreciated and thanks in advance for any advice given! Link to comment Share on other sites More sharing options...
KaFu Posted August 12, 2010 Share Posted August 12, 2010 Take a look at my program SSD. You wrote "I know in Windows XP", that makes me assume you're running either Vista or Win7, which both don't allow switching of output any other way then manual (no api disclosed). I think what's true for output is also true for input. I guess you can use the SSD logic, hiding the control panel as it pops up. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Painkiller Posted August 12, 2010 Author Share Posted August 12, 2010 (edited) Take a look at my program SSD. You wrote "I know in Windows XP", that makes me assume you're running either Vista or Win7, which both don't allow switching of output any other way then manual (no api disclosed). I think what's true for output is also true for input. I guess you can use the SSD logic, hiding the control panel as it pops up.Thanks but i am running windows XP. This program is not intended for vista or windows 7 but merely for XP only! "But i know in windows xp(thats what this is for)" Edited August 12, 2010 by Painkiller Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now