Skip to content

Commit

Permalink
moved feedback to a subroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
SaifAqqad committed Aug 21, 2020
1 parent 337a64d commit 8ea8ae0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MicMute.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (hotkey_mute=hotkey_unmute){
toggle_hotkey(){
VA_SetMasterMute(!global_mute, device_name)
update_state()
show_feedback(global_mute, sound_feedback, OSD_feedback)
SetTimer, show_feedback, -1
}
ptt_hotkey(){
unmute_hotkey()
Expand All @@ -32,19 +32,19 @@ mute_hotkey(){
return
VA_SetMasterMute(1, device_name)
update_state()
show_feedback(global_mute, sound_feedback, OSD_feedback)
SetTimer, show_feedback, -1
}
unmute_hotkey(){
if (!global_mute)
return
VA_SetMasterMute(0, device_name)
update_state()
show_feedback(global_mute, sound_feedback, OSD_feedback)
SetTimer, show_feedback, -1
}
update_state(){
state:=VA_GetMasterMute(device_name)
if (state!=global_mute){
global_mute:=state
update_tray(global_mute)
update_tray()
}
}

0 comments on commit 8ea8ae0

Please sign in to comment.