mute both mic input and output when mic mute is pressed

This commit is contained in:
David Daily 2021-11-24 11:44:42 -06:00
parent 2fcdf6fd3b
commit 0581ed413b
1 changed files with 11 additions and 12 deletions

23
VB.ahk
View File

@ -1,3 +1,4 @@
#Include, flag.ahk
SetWorkingDir, C:\Users\Leand.000\Documents\D3K SetWorkingDir, C:\Users\Leand.000\Documents\D3K
#SingleInstance force #SingleInstance force
#MaxHotkeysPerInterval 99000000 #MaxHotkeysPerInterval 99000000
@ -98,10 +99,7 @@ midiCCin:
Lvl := fader_to_fader(val) Lvl := fader_to_fader(val)
adjustVolLvl("Bus[2].Gain", Lvl) adjustVolLvl("Bus[2].Gain", Lvl)
Return Return
Case 2, 4: Case 2, 3, 4:
adjustToggle("Bus[2].Mute", val)
Return
Case 3:
adjustToggle("Bus[2].Mute", val) adjustToggle("Bus[2].Mute", val)
Return Return
Default: Default:
@ -201,10 +199,11 @@ midiCCin:
adjustVolLvl("Bus[1].Gain", Lvl) adjustVolLvl("Bus[1].Gain", Lvl)
Return Return
Case 3: Case 3:
adjustToggle("Strip[1].Mute", val)
adjustToggle("Bus[1].Mute", val) adjustToggle("Bus[1].Mute", val)
Return Return
Case 4: ; Mute mic input Case 4:
adjustToggle("Strip[1].Mute", val) adjustToggle("Strip[1].B2", val)
Return Return
Default: Default:
Return Return
@ -230,8 +229,8 @@ midiCCin:
adjustToggle("Strip[2].B2", val) adjustToggle("Strip[2].B2", val)
if (val) if (val)
{ {
Send {F22} ; Toggle PTT/Voice Activity Send {F22} ; Toggle PTT/Voice Activity (Shows up as UNK133 in discord)
Send {F23 down} Send {F23 down} ; PTT button (Shows up as UNK134 in discord)
} else { } else {
Send {F23 up} Send {F23 up}
Send {F22} ; Toggle PTT/Voice Activity Send {F22} ; Toggle PTT/Voice Activity
@ -263,8 +262,6 @@ midiCCin:
{ {
Send {F22} ; Toggle PTT/Voice Activity Send {F22} ; Toggle PTT/Voice Activity
Send {F23 down} Send {F23 down}
;Random, temp, 1, 4
;adjustString("Recorder.Load", "D:\Combine\metropolice\die" . temp . ".wav")
adjustToggle("Recorder.Play", True) ; Temp fix until file loading works adjustToggle("Recorder.Play", True) ; Temp fix until file loading works
} else { } else {
Send {F23 up} Send {F23 up}
@ -277,13 +274,13 @@ midiCCin:
Case 5: ; <- under Marker / dislike song Case 5: ; <- under Marker / dislike song
if !(val) if !(val)
{ {
Send ^+{PgDn} Send {F20}
} }
Return Return
Case 6: ; -> under Marker / like song Case 6: ; -> under Marker / like song
if !(val) if !(val)
{ {
Send ^+{PgUp} Send {F21}
} }
Return Return
Case 7: ; Rewind Case 7: ; Rewind
@ -352,6 +349,7 @@ Volume_Mute::
adjustToggle("Bus[2].Mute", b2Ms) ; Work Laptop Send adjustToggle("Bus[2].Mute", b2Ms) ; Work Laptop Send
adjustToggle("Bus[3].Mute", b3Ms) ; Comms Send adjustToggle("Bus[3].Mute", b3Ms) ; Comms Send
adjustToggle("Bus[4].Mute", b4Ms) ; Recording adjustToggle("Bus[4].Mute", b4Ms) ; Recording
Run %A_AhkPath% "flag.ahk" "off"
} else { } else {
adjustToggle("Bus[0].Mute", True) ; Speakers adjustToggle("Bus[0].Mute", True) ; Speakers
adjustToggle("Bus[1].Mute", True) ; Headphones adjustToggle("Bus[1].Mute", True) ; Headphones
@ -363,6 +361,7 @@ Volume_Mute::
b2Ms := b2M b2Ms := b2M
b3Ms := b3M b3Ms := b3M
b4Ms := b4M b4Ms := b4M
Run %A_AhkPath% "flag.ahk" "s" "red"
} }
Return Return