vst3 indentation/alignment

This commit is contained in:
Paolo Marrone 2024-07-04 09:48:34 +02:00
parent 086b6f719b
commit 09af4d9af9
2 changed files with 262 additions and 262 deletions

View File

@ -22,17 +22,17 @@
#include <stdint.h> #include <stdint.h>
typedef struct { typedef struct {
void * handle; void *handle;
const char * format; const char *format;
const char * (*get_bindir)(void *handle); const char *(*get_bindir)(void *handle);
const char * (*get_datadir)(void *handle); const char *(*get_datadir)(void *handle);
} plugin_callbacks; } plugin_callbacks;
typedef struct { typedef struct {
void * handle; void *handle;
const char * format; const char *format;
const char * (*get_bindir)(void *handle); const char *(*get_bindir)(void *handle);
const char * (*get_datadir)(void *handle); const char *(*get_datadir)(void *handle);
void (*set_parameter)(void *handle, size_t index, float value); void (*set_parameter)(void *handle, size_t index, float value);
} plugin_ui_callbacks; } plugin_ui_callbacks;
@ -196,21 +196,21 @@ static double parameterAdjust(int i, double v) {
} }
typedef struct pluginInstance { typedef struct pluginInstance {
Steinberg_Vst_IComponentVtbl * vtblIComponent; Steinberg_Vst_IComponentVtbl *vtblIComponent;
Steinberg_Vst_IAudioProcessorVtbl * vtblIAudioProcessor; Steinberg_Vst_IAudioProcessorVtbl *vtblIAudioProcessor;
Steinberg_Vst_IProcessContextRequirementsVtbl * vtblIProcessContextRequirements; Steinberg_Vst_IProcessContextRequirementsVtbl *vtblIProcessContextRequirements;
Steinberg_uint32 refs; Steinberg_uint32 refs;
Steinberg_FUnknown * context; Steinberg_FUnknown *context;
plugin p; plugin p;
float sampleRate; float sampleRate;
#if DATA_PRODUCT_PARAMETERS_N > 0 #if DATA_PRODUCT_PARAMETERS_N > 0
float parameters[DATA_PRODUCT_PARAMETERS_N]; float parameters[DATA_PRODUCT_PARAMETERS_N];
#endif #endif
#if DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N > 0 #if DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N > 0
const float * inputs[DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N]; const float *inputs[DATA_PRODUCT_CHANNELS_AUDIO_INPUT_N];
#endif #endif
#if DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N > 0 #if DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N > 0
float * outputs[DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N]; float *outputs[DATA_PRODUCT_CHANNELS_AUDIO_OUTPUT_N];
#endif #endif
#if DATA_PRODUCT_BUSES_AUDIO_INPUT_N > 0 #if DATA_PRODUCT_BUSES_AUDIO_INPUT_N > 0
char inputsActive[DATA_PRODUCT_BUSES_AUDIO_INPUT_N]; char inputsActive[DATA_PRODUCT_BUSES_AUDIO_INPUT_N];
@ -224,7 +224,7 @@ typedef struct pluginInstance {
#if DATA_PRODUCT_BUSES_MIDI_OUTPUT_N > 0 #if DATA_PRODUCT_BUSES_MIDI_OUTPUT_N > 0
char midiOutputsActive[DATA_PRODUCT_BUSES_MIDI_OUTPUT_N]; char midiOutputsActive[DATA_PRODUCT_BUSES_MIDI_OUTPUT_N];
#endif #endif
void * mem; void *mem;
} pluginInstance; } pluginInstance;
static Steinberg_Vst_IComponentVtbl pluginVtblIComponent; static Steinberg_Vst_IComponentVtbl pluginVtblIComponent;
@ -903,19 +903,19 @@ static Steinberg_Vst_IProcessContextRequirementsVtbl pluginVtblIProcessContextRe
typedef struct plugView plugView; typedef struct plugView plugView;
typedef struct controller { typedef struct controller {
Steinberg_Vst_IEditControllerVtbl * vtblIEditController; Steinberg_Vst_IEditControllerVtbl *vtblIEditController;
Steinberg_Vst_IMidiMappingVtbl * vtblIMidiMapping; Steinberg_Vst_IMidiMappingVtbl *vtblIMidiMapping;
#ifdef DATA_UI #ifdef DATA_UI
//Steinberg_Vst_IConnectionPointVtbl * vtblIConnectionPoint; //Steinberg_Vst_IConnectionPointVtbl * vtblIConnectionPoint;
#endif #endif
Steinberg_uint32 refs; Steinberg_uint32 refs;
Steinberg_FUnknown * context; Steinberg_FUnknown *context;
#if DATA_PRODUCT_PARAMETERS_N + DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0 #if DATA_PRODUCT_PARAMETERS_N + DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0
double parameters[DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N]; double parameters[DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N];
#endif #endif
struct Steinberg_Vst_IComponentHandler * componentHandler; struct Steinberg_Vst_IComponentHandler *componentHandler;
#ifdef DATA_UI #ifdef DATA_UI
plugView ** views; plugView **views;
size_t viewsCount; size_t viewsCount;
#endif #endif
} controller; } controller;
@ -929,9 +929,9 @@ static Steinberg_Vst_IEditControllerVtbl controllerVtblIEditController;
# include <X11/Xlib.h> # include <X11/Xlib.h>
typedef struct { typedef struct {
Steinberg_ITimerHandlerVtbl * vtblITimerHandler; Steinberg_ITimerHandlerVtbl *vtblITimerHandler;
Steinberg_uint32 refs; Steinberg_uint32 refs;
void * data; void *data;
void (*cb)(void *data); void (*cb)(void *data);
} timerHandler; } timerHandler;
@ -1000,15 +1000,15 @@ static Steinberg_ITimerHandlerVtbl timerHandlerVtblITimerHandler = {
# endif # endif
typedef struct plugView { typedef struct plugView {
Steinberg_IPlugViewVtbl * vtblIPlugView; Steinberg_IPlugViewVtbl *vtblIPlugView;
Steinberg_uint32 refs; Steinberg_uint32 refs;
Steinberg_IPlugFrame * frame; Steinberg_IPlugFrame *frame;
plugin_ui * ui; plugin_ui *ui;
controller * ctrl; controller *ctrl;
# ifdef __linux__ # ifdef __linux__
Steinberg_IRunLoop * runLoop; Steinberg_IRunLoop *runLoop;
timerHandler timer; timerHandler timer;
Display * display; Display *display;
# elif defined(__APPLE__) # elif defined(__APPLE__)
CFRunLoopTimerRef timer; CFRunLoopTimerRef timer;
# elif defined(_WIN32) || defined(__CYGWIN__) # elif defined(_WIN32) || defined(__CYGWIN__)
@ -1457,7 +1457,7 @@ static Steinberg_tresult controllerInitialize(void* thisInterface, struct Steinb
#endif #endif
#if DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0 #if DATA_PRODUCT_BUSES_MIDI_INPUT_N > 0
for (int i = DATA_PRODUCT_PARAMETERS_N; i < DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N; i += 3) { for (int i = DATA_PRODUCT_PARAMETERS_N; i < DATA_PRODUCT_PARAMETERS_N + 3 * DATA_PRODUCT_BUSES_MIDI_INPUT_N; i += 3) {
c->parameters[i] = 0.0; c->parameters[i ] = 0.0;
c->parameters[i + 1] = 0.5; c->parameters[i + 1] = 0.5;
c->parameters[i + 2] = 0.0; c->parameters[i + 2] = 0.0;
} }