Deafen and Mute functionality
This commit is contained in:
parent
90474792a8
commit
23ad2dc963
72
VB.ahk
72
VB.ahk
@ -132,48 +132,86 @@ Volume_Down::
|
||||
return
|
||||
|
||||
Volume_Mute::
|
||||
If GetKeyState("Media_Stop")
|
||||
If GetKeyState("Media_Stop") ; Mutes all output, and Comms as well for good measure. Basically a kill switch
|
||||
{
|
||||
b0M := Round(readParam("Bus[0]" . ".Mute"))
|
||||
b1M := Round(readParam("Bus[1]" . ".Mute"))
|
||||
cM := b0M + b1M
|
||||
b0M := Round(readParam("Bus[0]" . ".Mute")) ; Speakers
|
||||
b1M := Round(readParam("Bus[1]" . ".Mute")) ; Headphones
|
||||
b3M := Round(readParam("Bus[3]" . ".Mute")) ; Comms
|
||||
cM := b0M + b1M + b3M
|
||||
|
||||
if (cM = "2")
|
||||
{
|
||||
adjustMute("Bus[0]" . ".Mute", b0Ms)
|
||||
adjustMute("Bus[1]" . ".Mute", b1Ms)
|
||||
if (cM = "3")
|
||||
{ ; Unmute the ones that were unmuted before
|
||||
adjustMute("Bus[0]" . ".Mute", b0Ms) ; Speakers
|
||||
adjustMute("Bus[1]" . ".Mute", b1Ms) ; Headphones
|
||||
adjustMute("Bus[1]" . ".Mute", b3Ms) ; Comms
|
||||
} else {
|
||||
if !(b0M)
|
||||
if !(b0M) ; Speakers
|
||||
{
|
||||
b0Ms := True
|
||||
} else {
|
||||
b0Ms := False
|
||||
}
|
||||
|
||||
if !(b1M)
|
||||
if !(b1M) ; Headphones
|
||||
{
|
||||
b1Ms := True
|
||||
} else {
|
||||
b1Ms := False
|
||||
}
|
||||
adjustMute("Bus[0]" . ".Mute", "0")
|
||||
adjustMute("Bus[1]" . ".Mute", "0")
|
||||
|
||||
if !(b3M) ; Comms
|
||||
{
|
||||
b3Ms := True
|
||||
} else {
|
||||
b3Ms := False
|
||||
}
|
||||
; Mute
|
||||
adjustMute("Bus[0]" . ".Mute", "0") ; Speakers
|
||||
adjustMute("Bus[1]" . ".Mute", "0") ; Headphones
|
||||
adjustMute("Bus[1]" . ".Mute", "0") ; Comms
|
||||
}
|
||||
Return
|
||||
}
|
||||
cM := Round(readParam("Bus[0]" . ".Mute"))
|
||||
cM := Round(readParam("Bus[0]" . ".Mute")) ; Toggles between the speakers and headphones being muted, normal operation
|
||||
if (cM)
|
||||
{
|
||||
adjustMute("Bus[0]" . ".Mute", "1")
|
||||
adjustMute("Bus[1]" . ".Mute", "0")
|
||||
adjustMute("Bus[0]" . ".Mute", "1") ; Speakers
|
||||
adjustMute("Bus[1]" . ".Mute", "0") ; Headphones
|
||||
}
|
||||
if !(cM)
|
||||
{
|
||||
adjustMute("Bus[0]" . ".Mute", "0")
|
||||
adjustMute("Bus[1]" . ".Mute", "1")
|
||||
adjustMute("Bus[0]" . ".Mute", "0") ; Speakers
|
||||
adjustMute("Bus[1]" . ".Mute", "1") ; Headphones
|
||||
}
|
||||
return
|
||||
|
||||
!m:: ; Mute: No audio out
|
||||
b3M := Round(readParam("Bus[3]" . ".Mute")) ; Comms IN
|
||||
|
||||
if !(b3M)
|
||||
{
|
||||
adjustMute("Bus[3]" . ".Mute", "0")
|
||||
} else {
|
||||
adjustMute("Bus[3]" . ".Mute", "1")
|
||||
}
|
||||
Send {F23}
|
||||
Return
|
||||
|
||||
!n:: ; Deafen: No audio in or out
|
||||
b3M := Round(readParam("Bus[3]" . ".Mute")) ; Comms IN
|
||||
s4M := Round(readParam("Strip[4]" . ".Mute")) ; Comms OUT
|
||||
|
||||
If (s4M)
|
||||
{
|
||||
adjustMute("Bus[3]" . ".Mute", "1")
|
||||
adjustMute("Strip[4]" . ".Mute", "1")
|
||||
} else {
|
||||
adjustMute("Bus[3]" . ".Mute", "0")
|
||||
adjustMute("Strip[4]" . ".Mute", "0")
|
||||
}
|
||||
Send {F24}
|
||||
Return
|
||||
|
||||
|
||||
; == Functions ==
|
||||
; ===============
|
||||
|
Loading…
Reference in New Issue
Block a user