vst3: typo bug fix

This commit is contained in:
Paolo Marrone 2025-07-08 12:01:43 +02:00
parent ff48361165
commit 378bbe9518
3 changed files with 11 additions and 7 deletions

View File

@ -74,6 +74,7 @@
// https://github.com/rubberduck-vba/Rubberduck/wiki/COM-in-plain-C // https://github.com/rubberduck-vba/Rubberduck/wiki/COM-in-plain-C
// https://devblogs.microsoft.com/oldnewthing/20040205-00/?p=40733 // https://devblogs.microsoft.com/oldnewthing/20040205-00/?p=40733
//#define TIBIA_TRACE
#ifdef TIBIA_TRACE #ifdef TIBIA_TRACE
# define TRACE(...) printf(__VA_ARGS__); fflush(stdout); # define TRACE(...) printf(__VA_ARGS__); fflush(stdout);
#else #else
@ -391,8 +392,9 @@ static Steinberg_tresult pluginQueryInterface(pluginInstance *p, const Steinberg
#endif #endif
else { else {
TRACE(" not supported\n"); TRACE(" not supported\n");
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++) {
TRACE(" %x", iid[i]); TRACE(" %x", iid[i]);
}
TRACE("\n"); TRACE("\n");
*obj = NULL; *obj = NULL;
return Steinberg_kNoInterface; return Steinberg_kNoInterface;
@ -1542,8 +1544,9 @@ static Steinberg_tresult plugViewQueryInterface(void *thisInterface, const Stein
offset = offsetof(plugView, vtblIPlugView); offset = offsetof(plugView, vtblIPlugView);
else { else {
TRACE(" not supported\n"); TRACE(" not supported\n");
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++) {
TRACE(" %x", iid[i]); TRACE(" %x", iid[i]);
}
TRACE("\n"); TRACE("\n");
*obj = NULL; *obj = NULL;
return Steinberg_kNoInterface; return Steinberg_kNoInterface;
@ -2024,8 +2027,9 @@ static Steinberg_tresult controllerQueryInterface(controller *c, const Steinberg
#endif #endif
else { else {
TRACE(" not supported\n"); TRACE(" not supported\n");
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++) {
TRACE(" %x", iid[i]); TRACE(" %x", iid[i]);
}
TRACE("\n"); TRACE("\n");
*obj = NULL; *obj = NULL;
return Steinberg_kNoInterface; return Steinberg_kNoInterface;
@ -2432,7 +2436,7 @@ static struct Steinberg_IPlugView* controllerCreateView(void* thisInterface, Ste
controller *c = (controller *)((char *)thisInterface - offsetof(controller, vtblIEditController)); controller *c = (controller *)((char *)thisInterface - offsetof(controller, vtblIEditController));
size_t i; size_t i;
for (i = 0; i < c->viewsCount; c++) { for (i = 0; i < c->viewsCount; i++) {
if (c->views[i] != NULL) { if (c->views[i] != NULL) {
TRACE("controllerCreateView: trying to create another view - not supported \n"); TRACE("controllerCreateView: trying to create another view - not supported \n");
return NULL; return NULL;
@ -2443,7 +2447,7 @@ static struct Steinberg_IPlugView* controllerCreateView(void* thisInterface, Ste
if (view == NULL) if (view == NULL)
return NULL; return NULL;
for (i = 0; i < c->viewsCount; c++) for (i = 0; i < c->viewsCount; i++)
if (c->views[i] == NULL) if (c->views[i] == NULL)
break; break;
if (i == c->viewsCount) { if (i == c->viewsCount) {

View File

@ -43,7 +43,7 @@ typedef struct plugin {
#if TEMPLATE_SUPPORTS_MESSAGING #if TEMPLATE_SUPPORTS_MESSAGING
#include <stdio.h> #include <stdio.h>
static void plugin_receive_from_ui (plugin *instance, const void *data, size_t bytes) { static void plugin_receive_from_ui (plugin *instance, const void *data, size_t bytes) {
printf("plugin_receive_from_ui %ld bytes at %p: ", bytes, data); printf("plugin_receive_from_ui %lld bytes at %p: ", bytes, data);
for (size_t i = 0; i < bytes; i++) { for (size_t i = 0; i < bytes; i++) {
printf("%c", ((uint8_t*) data)[i]); printf("%c", ((uint8_t*) data)[i]);
} }

View File

@ -41,7 +41,7 @@ typedef struct {
#ifdef TEMPLATE_SUPPORTS_MESSAGING #ifdef TEMPLATE_SUPPORTS_MESSAGING
static void plugin_ui_receive_from_dsp (plugin_ui *instance, const void *data, size_t bytes) { static void plugin_ui_receive_from_dsp (plugin_ui *instance, const void *data, size_t bytes) {
(void) instance; (void) instance;
printf("plugin_ui_receive_from_dsp %ld bytes at %p: ", bytes, data); printf("plugin_ui_receive_from_dsp %lld bytes at %p: ", bytes, data);
for (size_t i = 0; i < bytes; i++) { for (size_t i = 0; i < bytes; i++) {
printf("%c", ((uint8_t*) data)[i]); printf("%c", ((uint8_t*) data)[i]);
} }