Jump to content

Search the Community

Showing results for tags 'volume mixer'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Today I decided to fix my problem of yelling on my headset's mic. to the point of ... coding a solution As I change the headset, the mic. don't change ( and I forget to do it manually ), so I searched the form for code and came up with the solution to my need. #include <Debug.au3> ; for _DebugArrayDisplay() #include "SetMicForPlayback.bulk.au3" ;~ Global $g_aEnumerateAudioDevices = _EnumerateAudioDevices() ;~ Global $g_aEnumerateAudioDevicesWas = $g_aEnumerateAudioDevices ;~ _DebugArrayDisplay($g_aEnumerateAudioDevicesWas, "$g_aEnumerateAudioDevicesWas") ;~ Row |Col 0 |Col 1 |Col 2 |Col 3 |Col 4 ;~ Row 0 |Playback |{34d90035-0679-4b97-b868-ddba418b989b} |{0.0.0.00000000}.{34d90035-0679-4b97-b868-ddba418b989b}|Speakers (High Definition Audio Device) |1 ;~ Row 1 |Playback |{43d508ee-19c5-4513-bd52-e1b7ba57ee82} |{0.0.0.00000000}.{43d508ee-19c5-4513-bd52-e1b7ba57ee82}|Headset Earphone (2- Arctis Pro Wireless Chat) |0 ;~ Row 2 |Playback |{a6f69bc4-f708-4a0f-bf58-995fe9d5d221} |{0.0.0.00000000}.{a6f69bc4-f708-4a0f-bf58-995fe9d5d221}|Headset Earphone (Corsair VOID Wireless Gaming Dongle) |0 ;~ Row 3 |Microphone |{a025c7e9-3655-474f-9643-8f05f1e4d591} |{0.0.1.00000000}.{a025c7e9-3655-474f-9643-8f05f1e4d591}|Headset Microphone (2- Arctis Pro Wireless Chat) |0 ;~ Row 4 |Microphone |{f9a630d2-44e9-4db5-b115-9fe7503a2ec7} |{0.0.1.00000000}.{f9a630d2-44e9-4db5-b115-9fe7503a2ec7}|Headset Microphone (Corsair VOID Wireless Gaming Dongle) |1 ;~ _SwitchToDevice($g_aEnumerateAudioDevices[4][2]) ;~ + [1]"OnDefaultDeviceChanged", [2]"0", [3]"1", [4]"{0.0.0.00000000}.{43d508ee-19c5-4513-bd52-e1b7ba57ee82}" ;~ + [1]"OnDefaultDeviceChanged", [2]"0", [3]"1", [4]"{0.0.0.00000000}.{34d90035-0679-4b97-b868-ddba418b989b}" main() Func main() If WinExists(StringTrimRight(@ScriptName, 4) & "'s hidden window") Then Exit 0 AutoItWinSetTitle(StringTrimRight(@ScriptName, 4) & "'s hidden window") Local $n, $a, $s, $b, $i While Sleep(50) If $g_aAudioSwitched[0] And TimerDiff($g_aAudioSwitched[0]) > 500 Then ConsoleWrite('+ [1]"' & $g_aAudioSwitched[1] & '", [2]"' & $g_aAudioSwitched[2] & '", [3]"' & $g_aAudioSwitched[3] & '", [4]"' & $g_aAudioSwitched[4] & '"' & @CRLF) Switch $g_aAudioSwitched[1] Case "OnDefaultDeviceChanged" $s = "" $a = _EnumerateAudioDevices() For $n = 0 To UBound($a) - 1 If $a[$n][2] = $g_aAudioSwitched[4] Then $b = StringSplit($a[$n][3], "()", 0) If UBound($b) > 2 Then $s = $b[2] ConsoleWrite($s & @CRLF) ExitLoop EndIf Next If $s = "" Then ConsoleWrite(@TAB & $s & ' = not found ?, just 1 device ?, remote audio ?' & @CRLF) Else $i = 5 For $n = 0 To UBound($a) - 1 If $a[$n][0] = "Microphone" Then If StringInStr($a[$n][3], $s) Then ; ObjCreateInterface: "Warning: This feature is experimental." $i = ShellExecuteWait(@ScriptFullPath, "/ErrorStdOut " & $a[$n][2], @ScriptDir) Switch $i Case 3 ConsoleWrite(@TAB & $s & ": apply = True" & @CRLF) Case 4 ConsoleWrite(@TAB & $s & ": apply = False" & @CRLF) Case 1 ConsoleWrite(@TAB & $s & ": apply = Crashed" & @CRLF) Case Else ConsoleWrite(@TAB & $s & ": no clue !" & @CRLF) EndSwitch ExitLoop EndIf Else ContinueLoop EndIf Next EndIf If $i = 5 Then ConsoleWrite(@TAB & $s & ' = ..have to code a "default mic" if none associated. ( you do it, I don''t have one. )' & @CRLF) ;~ AdlibRegister("did_it_work") ; ...to have some feedback while in development, but the "Sound"("Recording" tab), shows the change on the fly. Case Else ConsoleWrite("! no code written for this event" & @CRLF) EndSwitch $g_aAudioSwitched[0] = 0 $g_aAudioSwitched[1] = "" EndIf WEnd EndFunc ;==>main Func did_it_work() AdlibUnRegister("did_it_work") Local $a = _EnumerateAudioDevices() _DebugArrayDisplay($a, "_EnumerateAudioDevices()") EndFunc ;==>did_it_work SetMicForPlayback.bulk.au3 The "bulk" file has the real code, ( not mine, references are in the code ) SetMicForPlayback.au3 this is the "main()" ( the code you can read above ). Works for me on Win10 v???.???.?? ( I'm not good with updates ). Hope it helps the next guy playing TF2 as an engineer, finding a headset close to you, to tell your team color to use the teleport that goes to the enemy base to get the intel., no one listens, you get aggravated, #%#$#@$ .... PS: ..the above code misbehaves a lot and is left for the adventurous. Use the current code in the downloads section for a functional script.
×
×
  • Create New...