Compare commits

..

4 Commits

3 changed files with 17 additions and 2 deletions

View File

@ -59,6 +59,14 @@ Scripts can be loaded from text files, for example in Powershell:
./vmrcli.exe -D1 $(Get-Content .\example_commands.txt) ./vmrcli.exe -D1 $(Get-Content .\example_commands.txt)
``` ```
## `Build`
Run the included `makefile` to build with [GNU Make](https://www.gnu.org/software/make/).
By default the log.c module is built with coloured logging enabled. To disable this you can override the `LOG_USE_COLOR` variable, for example:
`make LOG_USE_COLOR=no`
## `Official Documentation` ## `Official Documentation`
- [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemoteAPI.pdf) - [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemoteAPI.pdf)

View File

@ -9,7 +9,12 @@ EXE := $(BIN_DIR)/$(program).exe
SRC := $(wildcard $(SRC_DIR)/*.c) SRC := $(wildcard $(SRC_DIR)/*.c)
OBJ := $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) OBJ := $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
CPPFLAGS := -Iinclude -MMD -MP LOG_USE_COLOR ?= yes
ifeq ($(LOG_USE_COLOR), yes)
CPPFLAGS := -Iinclude -MMD -MP -DLOG_USE_COLOR
else
CPPFLAGS := -Iinclude -MMD -MP
endif
CFLAGS = -O -Wall -W -pedantic -ansi -std=c99 CFLAGS = -O -Wall -W -pedantic -ansi -std=c99
LDFLAGS := -Llib LDFLAGS := -Llib
LDLIBS := -lm LDLIBS := -lm

View File

@ -194,6 +194,7 @@ void interactive(T_VBVMR_INTERFACE *vmr)
continue; continue;
} }
i = 0; i = 0;
log_trace("commands still in buffer: %s", p);
while (!isspace(*p)) while (!isspace(*p))
command[i++] = *p++; command[i++] = *p++;
@ -204,7 +205,8 @@ void interactive(T_VBVMR_INTERFACE *vmr)
memset(command, '\0', sizeof(command)); memset(command, '\0', sizeof(command));
} }
p = input; /* reset pointer */ p = input; /* reset pointer */
memset(input, '\0', sizeof(input)); /* reset input buffer */
printf(">> "); printf(">> ");
} }
} }