Skip to content

Commit

Permalink
Refactor VoicemeeterController
Browse files Browse the repository at this point in the history
  • Loading branch information
SaifAqqad committed Aug 7, 2022
1 parent b35d9e0 commit 3a8807f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/VoicemeeterController.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,20 @@ class VoicemeeterController extends MicrophoneController{

isVoicemeeterInstalled(p_path:=""){
try{
util_log("[VoicemeeterController] Checking if Voicemeeter is installed at " . (p_path? p_path : "default path"))
new VMR(p_path)
}catch{
}catch err{
util_log("[VoicemeeterController] " . err.Message)
return 0
}
return 1
}

initVoicemeeter(p_path:=""){
if(!VoicemeeterController.voicemeeter)
if(!VoicemeeterController.voicemeeter){
VoicemeeterController.voicemeeter:= new VMR(p_path).login()
util_log("[VoicemeeterController] Initialized Voicemeeter at: " . VBVMR.DLL_PATH)
}
return VoicemeeterController.voicemeeter
}

Expand Down

0 comments on commit 3a8807f

Please sign in to comment.