mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2025-07-15 08:51:46 +00:00
Compare commits
No commits in common. "760924def873c0a143be7938071fba3e565eec61" and "9863ca6dca98798629041a9e865013d28148ffb6" have entirely different histories.
760924def8
...
9863ca6dca
@ -38,7 +38,7 @@ Launch banana GUI, set log level to DEBUG, set Strip 0 label to podmic then prin
|
|||||||
|
|
||||||
## `Script files`
|
## `Script files`
|
||||||
|
|
||||||
Scripts can be loaded from text files, for example in Powershell:
|
Scripts can be loaded from text files, for example:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
./vmrcli.exe -D1 $(Get-Content .\example_commands.txt)
|
./vmrcli.exe -D1 $(Get-Content .\example_commands.txt)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef __CDLL_H__
|
|
||||||
#define __CDLL_H__
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "VoicemeeterRemote.h"
|
#include "VoicemeeterRemote.h"
|
||||||
|
|
||||||
|
#ifndef __CDLL_H__
|
||||||
|
#define __CDLL_H__
|
||||||
|
|
||||||
long initialize_dll_interfaces(T_VBVMR_INTERFACE *iVMR);
|
long initialize_dll_interfaces(T_VBVMR_INTERFACE *iVMR);
|
||||||
|
|
||||||
#endif /*__CDLL_H__*/
|
#endif /*__CDLL_H__*/
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef __VMR_H__
|
|
||||||
#define __VMR_H__
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "voicemeeterRemote.h"
|
#include "voicemeeterRemote.h"
|
||||||
|
|
||||||
|
#ifndef __VMR_H__
|
||||||
|
#define __VMR_H__
|
||||||
|
|
||||||
enum kind
|
enum kind
|
||||||
{
|
{
|
||||||
BASIC = 1,
|
BASIC = 1,
|
||||||
|
@ -51,7 +51,6 @@ long logout(T_VBVMR_INTERFACE *iVMR)
|
|||||||
|
|
||||||
long run_voicemeeter(T_VBVMR_INTERFACE *iVMR, int kind)
|
long run_voicemeeter(T_VBVMR_INTERFACE *iVMR, int kind)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_RunVoicemeeter(%d)", kind);
|
|
||||||
return iVMR->VBVMR_RunVoicemeeter((long)kind);
|
return iVMR->VBVMR_RunVoicemeeter((long)kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,31 +71,26 @@ bool is_pdirty(T_VBVMR_INTERFACE *iVMR)
|
|||||||
|
|
||||||
long get_parameter_float(T_VBVMR_INTERFACE *iVMR, char *param, float *f)
|
long get_parameter_float(T_VBVMR_INTERFACE *iVMR, char *param, float *f)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_GetParameterFloat(%s, %f)", param, f);
|
|
||||||
return iVMR->VBVMR_GetParameterFloat(param, f);
|
return iVMR->VBVMR_GetParameterFloat(param, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
long get_parameter_string(T_VBVMR_INTERFACE *iVMR, char *param, char *s)
|
long get_parameter_string(T_VBVMR_INTERFACE *iVMR, char *param, char *s)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_GetParameterStringA(%s, %s)", param, s);
|
|
||||||
return iVMR->VBVMR_GetParameterStringA(param, s);
|
return iVMR->VBVMR_GetParameterStringA(param, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
long set_parameter_float(T_VBVMR_INTERFACE *iVMR, char *param, float val)
|
long set_parameter_float(T_VBVMR_INTERFACE *iVMR, char *param, float val)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_SetParameterFloat(%s, %f)", param, val);
|
|
||||||
return iVMR->VBVMR_SetParameterFloat(param, val);
|
return iVMR->VBVMR_SetParameterFloat(param, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
long set_parameter_string(T_VBVMR_INTERFACE *iVMR, char *param, char *s)
|
long set_parameter_string(T_VBVMR_INTERFACE *iVMR, char *param, char *s)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_SetParameterStringA(%s, %s)", param, s);
|
|
||||||
return iVMR->VBVMR_SetParameterStringA(param, s);
|
return iVMR->VBVMR_SetParameterStringA(param, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
long set_parameters(T_VBVMR_INTERFACE *iVMR, char *command)
|
long set_parameters(T_VBVMR_INTERFACE *iVMR, char *command)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_SetParameters(%s)", command);
|
|
||||||
return iVMR->VBVMR_SetParameters(command);
|
return iVMR->VBVMR_SetParameters(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
src/vmrcli.c
16
src/vmrcli.c
@ -42,10 +42,10 @@ int main(int argc, char *argv[])
|
|||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
help();
|
help();
|
||||||
exit(EXIT_SUCCESS);
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_set_level(LOG_WARN);
|
log_set_level(LOG_INFO);
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "k:ihD:")) != -1)
|
while ((opt = getopt(argc, argv, "k:ihD:")) != -1)
|
||||||
{
|
{
|
||||||
@ -62,18 +62,10 @@ int main(int argc, char *argv[])
|
|||||||
help();
|
help();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
case 'D':
|
case 'D':
|
||||||
dvalue = atoi(optarg);
|
if ((dvalue = atoi(optarg)) && dvalue >= LOG_TRACE && dvalue <= LOG_FATAL)
|
||||||
if (dvalue >= LOG_TRACE && dvalue <= LOG_FATAL)
|
|
||||||
{
|
{
|
||||||
log_set_level(dvalue);
|
log_set_level(dvalue);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
fputs(
|
|
||||||
"-D arg out of range, expected value from 0 up to 5\n"
|
|
||||||
"Log level will default to LOG_WARN (3).\n",
|
|
||||||
stderr);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
@ -232,7 +224,7 @@ void parse_command(T_VBVMR_INTERFACE *vmr, char *command)
|
|||||||
puts(res.val.s);
|
puts(res.val.s);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fputs("Unexpected result type", stderr);
|
fputs("Unknown result...", stderr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user