Skip to content

Commit

Permalink
fixing potential hang
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetti committed Jun 20, 2020
1 parent 25e8145 commit 2d92416
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vmcli/vmcli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ void WaitForUpdate()

int GetParameterFloat(char* param, float* cur)
{
WaitForUpdate();
return iVMR.VBVMR_GetParameterFloat(param, cur);
}

Expand Down Expand Up @@ -67,12 +66,12 @@ int runCommand(char cmdChar[])
if (round(cur) == 1)
{
std::cout << "toggling " << param << " to 0\n";
std::cout << SetParameterFloat(param, 0.0f);
SetParameterFloat(param, 0.0f);
}
else if (round(cur) == 0)
{
std::cout << "toggling " << param << " to 1\n";
std::cout << SetParameterFloat(param, 1.0f);
SetParameterFloat(param, 1.0f);
}
return TRUE;
}
Expand Down Expand Up @@ -104,6 +103,7 @@ int initVoicemeeter()
return FALSE;
}
return TRUE;
WaitForUpdate();
}

/*******************************************************************************/
Expand Down

0 comments on commit 2d92416

Please sign in to comment.