mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2024-11-15 17:40:56 +00:00
define mb function pointers in the iVMR interface.
add trace logs for login, logout and mb functions
This commit is contained in:
parent
83a85fd7c5
commit
a28db25bcc
11
src/cdll.c
11
src/cdll.c
@ -109,6 +109,10 @@ long initialize_dll_interfaces(PT_VMR vmr)
|
|||||||
vmr->VBVMR_Input_GetDeviceDescA = (T_VBVMR_Input_GetDeviceDescA)GetProcAddress(G_H_Module, "VBVMR_Input_GetDeviceDescA");
|
vmr->VBVMR_Input_GetDeviceDescA = (T_VBVMR_Input_GetDeviceDescA)GetProcAddress(G_H_Module, "VBVMR_Input_GetDeviceDescA");
|
||||||
vmr->VBVMR_Input_GetDeviceDescW = (T_VBVMR_Input_GetDeviceDescW)GetProcAddress(G_H_Module, "VBVMR_Input_GetDeviceDescW");
|
vmr->VBVMR_Input_GetDeviceDescW = (T_VBVMR_Input_GetDeviceDescW)GetProcAddress(G_H_Module, "VBVMR_Input_GetDeviceDescW");
|
||||||
|
|
||||||
|
vmr->VBVMR_MacroButton_IsDirty = (T_VBVMR_MacroButton_IsDirty)GetProcAddress(G_H_Module, "VBVMR_MacroButton_IsDirty");
|
||||||
|
vmr->VBVMR_MacroButton_GetStatus = (T_VBVMR_MacroButton_GetStatus)GetProcAddress(G_H_Module, "VBVMR_MacroButton_GetStatus");
|
||||||
|
vmr->VBVMR_MacroButton_SetStatus = (T_VBVMR_MacroButton_SetStatus)GetProcAddress(G_H_Module, "VBVMR_MacroButton_SetStatus");
|
||||||
|
|
||||||
// check pointers are valid
|
// check pointers are valid
|
||||||
if (vmr->VBVMR_Login == NULL)
|
if (vmr->VBVMR_Login == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
@ -156,5 +160,12 @@ long initialize_dll_interfaces(PT_VMR vmr)
|
|||||||
if (vmr->VBVMR_Input_GetDeviceDescW == NULL)
|
if (vmr->VBVMR_Input_GetDeviceDescW == NULL)
|
||||||
return -35;
|
return -35;
|
||||||
|
|
||||||
|
if (vmr->VBVMR_MacroButton_IsDirty == NULL)
|
||||||
|
return -36;
|
||||||
|
if (vmr->VBVMR_MacroButton_GetStatus == NULL)
|
||||||
|
return -37;
|
||||||
|
if (vmr->VBVMR_MacroButton_SetStatus == NULL)
|
||||||
|
return -38;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -22,6 +22,7 @@ long login(PT_VMR vmr, int kind)
|
|||||||
int rep;
|
int rep;
|
||||||
long v;
|
long v;
|
||||||
|
|
||||||
|
log_trace("VBVMR_Login()");
|
||||||
rep = vmr->VBVMR_Login();
|
rep = vmr->VBVMR_Login();
|
||||||
if (rep == 1)
|
if (rep == 1)
|
||||||
{
|
{
|
||||||
@ -66,6 +67,7 @@ long logout(PT_VMR vmr)
|
|||||||
int rep;
|
int rep;
|
||||||
|
|
||||||
Sleep(20); /* give time for last command */
|
Sleep(20); /* give time for last command */
|
||||||
|
log_trace("VBVMR_Logout()");
|
||||||
rep = vmr->VBVMR_Logout();
|
rep = vmr->VBVMR_Logout();
|
||||||
if (rep == 0)
|
if (rep == 0)
|
||||||
log_info("Successfully logged out of the Voicemeeter API");
|
log_info("Successfully logged out of the Voicemeeter API");
|
||||||
@ -128,16 +130,19 @@ long set_parameters(PT_VMR vmr, char *command)
|
|||||||
|
|
||||||
bool is_mdirty(PT_VMR vmr)
|
bool is_mdirty(PT_VMR vmr)
|
||||||
{
|
{
|
||||||
|
log_trace("VBVMR_MacroButton_IsDirty()");
|
||||||
return vmr->VBVMR_MacroButton_IsDirty() == 1;
|
return vmr->VBVMR_MacroButton_IsDirty() == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
long macrobutton_getstatus(PT_VMR vmr, long n, float *val, long mode)
|
long macrobutton_getstatus(PT_VMR vmr, long n, float *val, long mode)
|
||||||
{
|
{
|
||||||
|
log_trace("VBVMR_MacroButton_GetStatus(%ld, <float> *v, %ld)", n, mode);
|
||||||
return vmr->VBVMR_MacroButton_GetStatus(n, val, mode);
|
return vmr->VBVMR_MacroButton_GetStatus(n, val, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
long macrobutton_setstatus(PT_VMR vmr, long n, float val, long mode)
|
long macrobutton_setstatus(PT_VMR vmr, long n, float val, long mode)
|
||||||
{
|
{
|
||||||
|
log_trace("VBVMR_MacroButton_SetStatus(%ld, %d, %ld)", n, (int)val, mode);
|
||||||
return vmr->VBVMR_MacroButton_SetStatus(n, val, mode);
|
return vmr->VBVMR_MacroButton_SetStatus(n, val, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user