Fix formatting and compiler errors
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
|
||||
#ifdef cplusplus
|
||||
extern "C" {
|
||||
#include <cinttypes>
|
||||
#else
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -30,7 +33,7 @@ enum VST_VERSION {
|
||||
VST_VERSION_2_2_0_0 = 2200, // Never seen yet, guessing here from the age.
|
||||
VST_VERSION_2_3_0_0 = 2300, // Never seen yet, guessing here from the age.
|
||||
VST_VERSION_2_4_0_0 = 2400, // Never seen yet, guessing here from the age.
|
||||
}
|
||||
};
|
||||
|
||||
enum VST_EFFECT_OPCODE {
|
||||
/* Create the effect (if it has not been created already).
|
||||
@@ -87,7 +90,8 @@ enum VST_EFFECT_OPCODE {
|
||||
|
||||
VST_EFFECT_OPCODE_0B = 0x0B,
|
||||
|
||||
VST_EFFECT_OPCODE_0C = 0x0C, // Calls something in the plugin itself, fails if the plugin is not initialized, or if the 4th argument is set.
|
||||
VST_EFFECT_OPCODE_0C =
|
||||
0x0C, // Calls something in the plugin itself, fails if the plugin is not initialized, or if the 4th argument is set.
|
||||
|
||||
/* Retrieve the client rect size of the plugins window.
|
||||
* If no window has been created, returns the default rect.
|
||||
@@ -122,7 +126,8 @@ enum VST_EFFECT_OPCODE {
|
||||
|
||||
VST_EFFECT_OPCODE_15 = 0x15,
|
||||
|
||||
VST_EFFECT_OPCODE_16 = 0x16, // Returns 0x4E764566, 'NvEf' doesn't ring a bell at all. Could be a "unique" effect id?
|
||||
VST_EFFECT_OPCODE_16 =
|
||||
0x16, // Returns 0x4E764566, 'NvEf' doesn't ring a bell at all. Could be a "unique" effect id?
|
||||
|
||||
VST_EFFECT_OPCODE_17 = 0x17, // Returns either 0 or the result of an internal call.
|
||||
|
||||
@@ -344,28 +349,30 @@ struct vst_effect {
|
||||
* @param p_ptr Parameter, see VST_EFFECT_OPCODES.
|
||||
* @param p_float Parameter, see VST_EFFECT_OPCODES.
|
||||
*/
|
||||
intptr_t (VST_FUNCTION_INTERFACE *control)(vst_effect *this, VST_EFFECT_OPCODE opcode, int32_t p_int1, intptr_t p_int2, void* p_ptr, float p_float);
|
||||
intptr_t(VST_FUNCTION_INTERFACE* control)(vst_effect* pthis, VST_EFFECT_OPCODE opcode, int32_t p_int1,
|
||||
intptr_t p_int2, void* p_ptr, float p_float);
|
||||
|
||||
/* Seems to call processFloat internally in any plugin I can find.
|
||||
* Possibly deprecated?
|
||||
*/
|
||||
void (VST_FUNCTION_INTERFACE *process)(vst_effect *this, const float* const* inputs, float ** outputs, int32_t samples);
|
||||
void(VST_FUNCTION_INTERFACE* process)(vst_effect* pthis, const float* const* inputs, float** outputs,
|
||||
int32_t samples);
|
||||
|
||||
/* Updates the value for the parameter at the given index, or does nothing if out of bounds.
|
||||
*
|
||||
* @param this Pointer to the effect itself.
|
||||
* @param pthis Pointer to the effect itself.
|
||||
* @param index Parameter index.
|
||||
* @param value New value for the parameter.
|
||||
*/
|
||||
void (VST_FUNCTION_INTERFACE *set_parameter)(vst_effect *this, uint32_t index, float value);
|
||||
void(VST_FUNCTION_INTERFACE* set_parameter)(vst_effect* pthis, uint32_t index, float value);
|
||||
|
||||
/* Returns the value stored for the parameter at index, or 0 if out of bounds.
|
||||
*
|
||||
* @param this Pointer to the effect itself.
|
||||
* @param pthis Pointer to the effect itself.
|
||||
* @param index Parameter index.
|
||||
* @return float Value of the parameter.
|
||||
*/
|
||||
float (VST_FUNCTION_INTERFACE *get_parameter)(vst_effect *this, uint32_t index);
|
||||
float(VST_FUNCTION_INTERFACE* get_parameter)(vst_effect* pthis, uint32_t index);
|
||||
|
||||
int32_t num_programs; // Number of possible programs.
|
||||
int32_t num_params; // Number of possible parameters.
|
||||
@@ -416,24 +423,26 @@ struct vst_effect {
|
||||
|
||||
/* Process the given number of samples in inputs and outputs.
|
||||
*
|
||||
* @param this Pointer to the effect itself.
|
||||
* @param pthis Pointer to the effect itself.
|
||||
* @param inputs Pointer to an array of 'const float[samples]' with size numInputs.
|
||||
* @param outputs Pointer to an array of 'float[samples]' with size numOutputs.
|
||||
* @param samples Number of samples per channel in inputs.
|
||||
*/
|
||||
void (VST_FUNCTION_INTERFACE *process_float)(vst_effect *this, const float * const* inputs, float ** outputs, int32_t samples);
|
||||
void(VST_FUNCTION_INTERFACE* process_float)(vst_effect* pthis, const float* const* inputs, float** outputs,
|
||||
int32_t samples);
|
||||
|
||||
/* Process the given number of samples in inputs and outputs.
|
||||
*
|
||||
* History:
|
||||
* - ReaControlMIDI: Found additional function after processFloat, which accessed things in 8-wide steps.
|
||||
*
|
||||
* @param this Pointer to the effect itself.
|
||||
* @param pthis Pointer to the effect itself.
|
||||
* @param inputs Pointer to an array of 'const double[samples]' with size numInputs.
|
||||
* @param outputs Pointer to an array of 'double[samples]' with size numOutputs.
|
||||
* @param samples Number of samples per channel in inputs.
|
||||
*/
|
||||
void (VST_FUNCTION_INTERFACE *process_double)(vst_effect *this, const double * const* inputs, double ** outputs, int32_t samples);
|
||||
void(VST_FUNCTION_INTERFACE* process_double)(vst_effect* pthis, const double* const* inputs, double** outputs,
|
||||
int32_t samples);
|
||||
|
||||
// Everything after this is unknown and was present in reacomp-standalone.dll.
|
||||
uint8_t _unknown[56]; // 56-bytes of something. Could also just be 52-bytes.
|
||||
@@ -445,7 +454,8 @@ struct vst_effect {
|
||||
* @param p_str Zero terminated string or null on call.
|
||||
* @return ?
|
||||
*/
|
||||
typedef intptr_t (*vst_host_callback)(vst_effect* plugin, VST_HOST_OPCODE opcode, int32_t p_int1, int64_t p_int2, const char* p_str, int32_t p_int3);
|
||||
typedef intptr_t (*vst_host_callback)(vst_effect* plugin, VST_HOST_OPCODE opcode, int32_t p_int1, int64_t p_int2,
|
||||
const char* p_str, int32_t p_int3);
|
||||
|
||||
const char* vst_host_string[] = {
|
||||
"GetResourcePath", // ReaControlMIDI
|
||||
@@ -455,8 +465,16 @@ const char* vst_host_string[] = {
|
||||
|
||||
// Entry point to the VST.
|
||||
#define VST_ENTRYPOINT vst_effect* VSTPluginMain(vst_host_callback callback)
|
||||
#define VST_ENTRYPOINT_WINDOWS vst_effect* MAIN(vst_host_callback callback) { return VSTPluginMain(callback); }
|
||||
#define VST_ENTRYPOINT_MACOS vst_effect* main_macho(vst_host_callback callback) { return VSTPluginMain(callback); }
|
||||
#define VST_ENTRYPOINT_WINDOWS \
|
||||
vst_effect* MAIN(vst_host_callback callback) \
|
||||
{ \
|
||||
return VSTPluginMain(callback); \
|
||||
}
|
||||
#define VST_ENTRYPOINT_MACOS \
|
||||
vst_effect* main_macho(vst_host_callback callback) \
|
||||
{ \
|
||||
return VSTPluginMain(callback); \
|
||||
}
|
||||
|
||||
#ifdef cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user