* cmake: support building VST3 * cmake: let VST3 use the same bundle files as VST2 * Reposition the V3_API specifier for MSVC * Disable VST3 on MSVC until fixedpull/338/head
@@ -154,7 +154,11 @@ function(dpf_add_plugin NAME) | |||||
elseif(_target STREQUAL "vst2") | elseif(_target STREQUAL "vst2") | ||||
dpf__build_vst2("${NAME}" "${_dgl_library}") | dpf__build_vst2("${NAME}" "${_dgl_library}") | ||||
elseif(_target STREQUAL "vst3") | elseif(_target STREQUAL "vst3") | ||||
dpf__build_vst3("${NAME}" "${_dgl_library}") | |||||
if(MSVC) | |||||
message(WARNING "TODO: VST3 is not supported on MSVC yet") | |||||
else() | |||||
dpf__build_vst3("${NAME}" "${_dgl_library}") | |||||
endif() | |||||
else() | else() | ||||
message(FATAL_ERROR "Unrecognized target type for plugin: ${_target}") | message(FATAL_ERROR "Unrecognized target type for plugin: ${_target}") | ||||
endif() | endif() | ||||
@@ -341,12 +345,61 @@ function(dpf__build_vst2 NAME DGL_LIBRARY) | |||||
endif() | endif() | ||||
endfunction() | endfunction() | ||||
# dpf__determine_vst3_package_architecture | |||||
# ------------------------------------------------------------------------------ | |||||
# | |||||
# Determines the package architecture for a VST3 plugin target. | |||||
# | |||||
function(dpf__determine_vst3_package_architecture OUTPUT_VARIABLE) | |||||
# if set by variable, override the detection | |||||
if(DPF_VST3_ARCHITECTURE) | |||||
set("${OUTPUT_VARIABLE}" "${DPF_VST3_ARCHITECTURE}" PARENT_SCOPE) | |||||
return() | |||||
endif() | |||||
# not used on Apple, which supports universal binary | |||||
if(APPLE) | |||||
set("${OUTPUT_VARIABLE}" "universal" PARENT_SCOPE) | |||||
return() | |||||
endif() | |||||
# identify the target processor (special case of MSVC, problematic sometimes) | |||||
if(MSVC) | |||||
set(vst3_system_arch "${MSVC_CXX_ARCHITECTURE_ID}") | |||||
else() | |||||
set(vst3_system_arch "${CMAKE_SYSTEM_PROCESSOR}") | |||||
endif() | |||||
# transform the processor name to a format that VST3 recognizes | |||||
if(vst3_system_arch MATCHES "^(x86_64|amd64|AMD64|x64|X64)$") | |||||
set(vst3_package_arch "x86_64") | |||||
elseif(vst3_system_arch MATCHES "^(i.86|x86|X86)$") | |||||
if(WIN32) | |||||
set(vst3_package_arch "x86") | |||||
else() | |||||
set(vst3_package_arch "i386") | |||||
endif() | |||||
elseif(vst3_system_arch MATCHES "^(armv[3-8][a-z]*)$") | |||||
set(vst3_package_arch "${vst3_system_arch}") | |||||
elseif(vst3_system_arch MATCHES "^(aarch64)$") | |||||
set(vst3_package_arch "aarch64") | |||||
else() | |||||
message(FATAL_ERROR "We don't know this architecture for VST3: ${vst3_system_arch}.") | |||||
endif() | |||||
# TODO: the detections for Windows arm/arm64 when supported | |||||
set("${OUTPUT_VARIABLE}" "${vst3_package_arch}" PARENT_SCOPE) | |||||
endfunction() | |||||
# dpf__build_vst3 | # dpf__build_vst3 | ||||
# ------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------ | ||||
# | # | ||||
# Add build rules for a VST3 plugin. | # Add build rules for a VST3 plugin. | ||||
# | # | ||||
function(dpf__build_vst3 NAME DGL_LIBRARY) | function(dpf__build_vst3 NAME DGL_LIBRARY) | ||||
dpf__determine_vst3_package_architecture(vst3_arch) | |||||
dpf__create_dummy_source_list(_no_srcs) | dpf__create_dummy_source_list(_no_srcs) | ||||
dpf__add_module("${NAME}-vst3" ${_no_srcs}) | dpf__add_module("${NAME}-vst3" ${_no_srcs}) | ||||
@@ -355,22 +408,30 @@ function(dpf__build_vst3 NAME DGL_LIBRARY) | |||||
dpf__set_module_export_list("${NAME}-vst3" "vst3") | dpf__set_module_export_list("${NAME}-vst3" "vst3") | ||||
target_link_libraries("${NAME}-vst3" PRIVATE "${NAME}-dsp" "${NAME}-ui") | target_link_libraries("${NAME}-vst3" PRIVATE "${NAME}-dsp" "${NAME}-ui") | ||||
set_target_properties("${NAME}-vst3" PROPERTIES | set_target_properties("${NAME}-vst3" PROPERTIES | ||||
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>" | |||||
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/vst3/$<0:>" | ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/vst3/$<0:>" | ||||
OUTPUT_NAME "${NAME}-vst3" | |||||
OUTPUT_NAME "${NAME}" | |||||
PREFIX "") | PREFIX "") | ||||
# TODO set correct output directory for VST3 packaging | |||||
#if(APPLE) | |||||
#set_target_properties("${NAME}-vst3" PROPERTIES | |||||
#LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents/MacOS/$<0:>" | |||||
#OUTPUT_NAME "${NAME}" | |||||
#SUFFIX "") | |||||
#set(INFO_PLIST_PROJECT_NAME "${NAME}") | |||||
#configure_file("${DPF_ROOT_DIR}/utils/plugin.vst3/Contents/Info.plist" | |||||
#"${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents/Info.plist" @ONLY) | |||||
#file(COPY "${DPF_ROOT_DIR}/utils/plugin.vst3/Contents/PkgInfo" | |||||
#DESTINATION "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents") | |||||
#endif() | |||||
if(APPLE) | |||||
set_target_properties("${NAME}-vst3" PROPERTIES | |||||
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents/MacOS/$<0:>" | |||||
SUFFIX "") | |||||
elseif(WIN32) | |||||
set_target_properties("${NAME}-vst3" PROPERTIES | |||||
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents/${vst3_arch}-win/$<0:>") | |||||
else() | |||||
set_target_properties("${NAME}-vst3" PROPERTIES | |||||
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents/${vst3_arch}-linux/$<0:>") | |||||
endif() | |||||
if(APPLE) | |||||
# Uses the same macOS bundle template as VST2 | |||||
set(INFO_PLIST_PROJECT_NAME "${NAME}") | |||||
configure_file("${DPF_ROOT_DIR}/utils/plugin.vst/Contents/Info.plist" | |||||
"${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents/Info.plist" @ONLY) | |||||
file(COPY "${DPF_ROOT_DIR}/utils/plugin.vst/Contents/PkgInfo" | |||||
DESTINATION "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents") | |||||
endif() | |||||
endfunction() | endfunction() | ||||
# dpf__add_dgl_cairo | # dpf__add_dgl_cairo | ||||
@@ -106,8 +106,8 @@ static dpf_tuid dpf_tuid_view = { dpf_id_entry, dpf_id_view, 0, 0 }; | |||||
struct v3_attribute_list_utf8 { | struct v3_attribute_list_utf8 { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*set_string_utf8)(void* self, const char* id, const char* string); | |||||
V3_API v3_result (*get_string_utf8)(void* self, const char* id, char* string, uint32_t size); | |||||
v3_result (V3_API *set_string_utf8)(void* self, const char* id, const char* string); | |||||
v3_result (V3_API *get_string_utf8)(void* self, const char* id, char* string, uint32_t size); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_attribute_list_utf8_iid = | static constexpr const v3_tuid v3_attribute_list_utf8_iid = | ||||
@@ -58,8 +58,8 @@ v3_message** dpf_message_create(const char* id); | |||||
struct v3_attribute_list_utf8 { | struct v3_attribute_list_utf8 { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*set_string_utf8)(void* self, const char* id, const char* string); | |||||
V3_API v3_result (*get_string_utf8)(void* self, const char* id, char* string, uint32_t size); | |||||
v3_result (V3_API *set_string_utf8)(void* self, const char* id, const char* string); | |||||
v3_result (V3_API *get_string_utf8)(void* self, const char* id, char* string, uint32_t size); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_attribute_list_utf8_iid = | static constexpr const v3_tuid v3_attribute_list_utf8_iid = | ||||
@@ -542,7 +542,7 @@ struct dpf_plugin_view_content_scale : v3_plugin_view_content_scale_cpp { | |||||
// ---------------------------------------------------------------------------------------------------------------- | // ---------------------------------------------------------------------------------------------------------------- | ||||
// v3_funknown | // v3_funknown | ||||
static V3_API v3_result query_interface_fn(void* self, const v3_tuid iid, void** iface) | |||||
static v3_result V3_API query_interface_fn(void* self, const v3_tuid iid, void** iface) | |||||
{ | { | ||||
d_stdout("dpf_plugin_view_content_scale::query_interface => %p %s %p", self, tuid2str(iid), iface); | d_stdout("dpf_plugin_view_content_scale::query_interface => %p %s %p", self, tuid2str(iid), iface); | ||||
*iface = NULL; | *iface = NULL; | ||||
@@ -566,13 +566,13 @@ struct dpf_plugin_view_content_scale : v3_plugin_view_content_scale_cpp { | |||||
} | } | ||||
// there is only a single instance of this, so we don't have to care here | // there is only a single instance of this, so we don't have to care here | ||||
static V3_API uint32_t ref_fn(void*) { return 1; }; | |||||
static V3_API uint32_t unref_fn(void*) { return 0; }; | |||||
static uint32_t V3_API ref_fn(void*) { return 1; }; | |||||
static uint32_t V3_API unref_fn(void*) { return 0; }; | |||||
// ---------------------------------------------------------------------------------------------------------------- | // ---------------------------------------------------------------------------------------------------------------- | ||||
// v3_plugin_view_content_scale_steinberg | // v3_plugin_view_content_scale_steinberg | ||||
static V3_API v3_result set_content_scale_factor_fn(void* self, float factor) | |||||
static v3_result V3_API set_content_scale_factor_fn(void* self, float factor) | |||||
{ | { | ||||
d_stdout("dpf_plugin_view::set_content_scale_factor => %p %f", self, factor); | d_stdout("dpf_plugin_view::set_content_scale_factor => %p %f", self, factor); | ||||
dpf_plugin_view_content_scale* const scale = *(dpf_plugin_view_content_scale**)self; | dpf_plugin_view_content_scale* const scale = *(dpf_plugin_view_content_scale**)self; | ||||
@@ -92,10 +92,10 @@ struct v3_process_setup { | |||||
struct v3_param_value_queue { | struct v3_param_value_queue { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_param_id (*get_param_id)(void* self); | |||||
V3_API int32_t (*get_point_count)(void* self); | |||||
V3_API v3_result (*get_point)(void* self, int32_t idx, int32_t* sample_offset, double* value); | |||||
V3_API v3_result (*add_point)(void* self, int32_t sample_offset, double value, int32_t* idx); | |||||
v3_param_id (V3_API *get_param_id)(void* self); | |||||
int32_t (V3_API *get_point_count)(void* self); | |||||
v3_result (V3_API *get_point)(void* self, int32_t idx, int32_t* sample_offset, double* value); | |||||
v3_result (V3_API *add_point)(void* self, int32_t sample_offset, double value, int32_t* idx); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_param_value_queue_iid = | static constexpr const v3_tuid v3_param_value_queue_iid = | ||||
@@ -104,9 +104,9 @@ static constexpr const v3_tuid v3_param_value_queue_iid = | |||||
struct v3_param_changes { | struct v3_param_changes { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API int32_t (*get_param_count)(void* self); | |||||
V3_API struct v3_param_value_queue** (*get_param_data)(void* self, int32_t idx); | |||||
V3_API struct v3_param_value_queue** (*add_param_data)(void* self, v3_param_id* id, int32_t* index); | |||||
int32_t (V3_API *get_param_count)(void* self); | |||||
struct v3_param_value_queue** (V3_API *get_param_data)(void* self, int32_t idx); | |||||
struct v3_param_value_queue** (V3_API *add_param_data)(void* self, v3_param_id* id, int32_t* index); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_param_changes_iid = | static constexpr const v3_tuid v3_param_changes_iid = | ||||
@@ -183,7 +183,7 @@ enum { | |||||
struct v3_process_context_requirements { | struct v3_process_context_requirements { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API uint32_t (*get_process_context_requirements)(void* self); | |||||
uint32_t (V3_API *get_process_context_requirements)(void* self); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_process_context_requirements_iid = | static constexpr const v3_tuid v3_process_context_requirements_iid = | ||||
@@ -224,15 +224,15 @@ struct v3_process_data { | |||||
struct v3_audio_processor { | struct v3_audio_processor { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*set_bus_arrangements)(void* self, v3_speaker_arrangement* inputs, int32_t num_inputs, | |||||
v3_result (V3_API *set_bus_arrangements)(void* self, v3_speaker_arrangement* inputs, int32_t num_inputs, | |||||
v3_speaker_arrangement* outputs, int32_t num_outputs); | v3_speaker_arrangement* outputs, int32_t num_outputs); | ||||
V3_API v3_result (*get_bus_arrangement)(void* self, int32_t bus_direction, int32_t idx, v3_speaker_arrangement*); | |||||
V3_API v3_result (*can_process_sample_size)(void* self, int32_t symbolic_sample_size); | |||||
V3_API uint32_t (*get_latency_samples)(void* self); | |||||
V3_API v3_result (*setup_processing)(void* self, struct v3_process_setup* setup); | |||||
V3_API v3_result (*set_processing)(void* self, v3_bool state); | |||||
V3_API v3_result (*process)(void* self, struct v3_process_data* data); | |||||
V3_API uint32_t (*get_tail_samples)(void* self); | |||||
v3_result (V3_API *get_bus_arrangement)(void* self, int32_t bus_direction, int32_t idx, v3_speaker_arrangement*); | |||||
v3_result (V3_API *can_process_sample_size)(void* self, int32_t symbolic_sample_size); | |||||
uint32_t (V3_API *get_latency_samples)(void* self); | |||||
v3_result (V3_API *setup_processing)(void* self, struct v3_process_setup* setup); | |||||
v3_result (V3_API *set_processing)(void* self, v3_bool state); | |||||
v3_result (V3_API *process)(void* self, struct v3_process_data* data); | |||||
uint32_t (V3_API *get_tail_samples)(void* self); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_audio_processor_iid = | static constexpr const v3_tuid v3_audio_processor_iid = | ||||
@@ -160,9 +160,9 @@ enum { | |||||
*/ | */ | ||||
struct v3_funknown { | struct v3_funknown { | ||||
V3_API v3_result (*query_interface)(void* self, const v3_tuid iid, void** obj); | |||||
V3_API uint32_t (*ref)(void* self); | |||||
V3_API uint32_t (*unref)(void* self); | |||||
v3_result (V3_API *query_interface)(void* self, const v3_tuid iid, void** obj); | |||||
uint32_t (V3_API *ref)(void* self); | |||||
uint32_t (V3_API *unref)(void* self); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_funknown_iid = | static constexpr const v3_tuid v3_funknown_iid = | ||||
@@ -175,8 +175,8 @@ static constexpr const v3_tuid v3_funknown_iid = | |||||
struct v3_plugin_base { | struct v3_plugin_base { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*initialise)(void* self, struct v3_funknown* context); | |||||
V3_API v3_result (*terminate)(void* self); | |||||
v3_result (V3_API *initialise)(void* self, struct v3_funknown* context); | |||||
v3_result (V3_API *terminate)(void* self); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_base_iid = | static constexpr const v3_tuid v3_plugin_base_iid = | ||||
@@ -27,10 +27,10 @@ enum v3_seek_mode { | |||||
struct v3_bstream { | struct v3_bstream { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*read)(void* self, void* buffer, int32_t num_bytes, int32_t* bytes_read); | |||||
V3_API v3_result (*write)(void* self, void* buffer, int32_t num_bytes, int32_t* bytes_written); | |||||
V3_API v3_result (*seek)(void* self, int64_t pos, int32_t seek_mode, int64_t* result); | |||||
V3_API v3_result (*tell)(void* self, int64_t* pos); | |||||
v3_result (V3_API *read)(void* self, void* buffer, int32_t num_bytes, int32_t* bytes_read); | |||||
v3_result (V3_API *write)(void* self, void* buffer, int32_t num_bytes, int32_t* bytes_written); | |||||
v3_result (V3_API *seek)(void* self, int64_t pos, int32_t seek_mode, int64_t* result); | |||||
v3_result (V3_API *tell)(void* self, int64_t* pos); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_bstream_iid = | static constexpr const v3_tuid v3_bstream_iid = | ||||
@@ -91,17 +91,17 @@ struct v3_routing_info; | |||||
struct v3_component { | struct v3_component { | ||||
struct v3_plugin_base; | struct v3_plugin_base; | ||||
V3_API v3_result (*get_controller_class_id)(void* self, v3_tuid class_id); | |||||
V3_API v3_result (*set_io_mode)(void* self, int32_t io_mode); | |||||
V3_API int32_t (*get_bus_count)(void* self, int32_t media_type, int32_t bus_direction); | |||||
V3_API v3_result (*get_bus_info)(void* self, int32_t media_type, int32_t bus_direction, | |||||
v3_result (V3_API *get_controller_class_id)(void* self, v3_tuid class_id); | |||||
v3_result (V3_API *set_io_mode)(void* self, int32_t io_mode); | |||||
int32_t (V3_API *get_bus_count)(void* self, int32_t media_type, int32_t bus_direction); | |||||
v3_result (V3_API *get_bus_info)(void* self, int32_t media_type, int32_t bus_direction, | |||||
int32_t bus_idx, struct v3_bus_info* bus_info); | int32_t bus_idx, struct v3_bus_info* bus_info); | ||||
V3_API v3_result (*get_routing_info)(void* self, struct v3_routing_info* input, struct v3_routing_info* output); | |||||
V3_API v3_result (*activate_bus)(void* self, int32_t media_type, int32_t bus_direction, | |||||
v3_result (V3_API *get_routing_info)(void* self, struct v3_routing_info* input, struct v3_routing_info* output); | |||||
v3_result (V3_API *activate_bus)(void* self, int32_t media_type, int32_t bus_direction, | |||||
int32_t bus_idx, v3_bool state); | int32_t bus_idx, v3_bool state); | ||||
V3_API v3_result (*set_active)(void* self, v3_bool state); | |||||
V3_API v3_result (*set_state)(void* self, struct v3_bstream **); | |||||
V3_API v3_result (*get_state)(void* self, struct v3_bstream **); | |||||
v3_result (V3_API *set_active)(void* self, v3_bool state); | |||||
v3_result (V3_API *set_state)(void* self, struct v3_bstream **); | |||||
v3_result (V3_API *get_state)(void* self, struct v3_bstream **); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_component_iid = | static constexpr const v3_tuid v3_component_iid = | ||||
@@ -42,10 +42,10 @@ enum { | |||||
struct v3_component_handler { | struct v3_component_handler { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*begin_edit)(void* self, v3_param_id); | |||||
V3_API v3_result (*perform_edit)(void* self, v3_param_id, double value_normalised); | |||||
V3_API v3_result (*end_edit)(void* self, v3_param_id); | |||||
V3_API v3_result (*restart_component)(void* self, int32_t flags); | |||||
v3_result (V3_API *begin_edit)(void* self, v3_param_id); | |||||
v3_result (V3_API *perform_edit)(void* self, v3_param_id, double value_normalised); | |||||
v3_result (V3_API *end_edit)(void* self, v3_param_id); | |||||
v3_result (V3_API *restart_component)(void* self, int32_t flags); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_component_handler_iid = | static constexpr const v3_tuid v3_component_handler_iid = | ||||
@@ -79,19 +79,19 @@ struct v3_param_info { | |||||
struct v3_edit_controller { | struct v3_edit_controller { | ||||
struct v3_plugin_base; | struct v3_plugin_base; | ||||
V3_API v3_result (*set_component_state)(void* self, struct v3_bstream*); | |||||
V3_API v3_result (*set_state)(void* self, struct v3_bstream*); | |||||
V3_API v3_result (*get_state)(void* self, struct v3_bstream*); | |||||
V3_API int32_t (*get_parameter_count)(void* self); | |||||
V3_API v3_result (*get_parameter_info)(void* self, int32_t param_idx, struct v3_param_info*); | |||||
V3_API v3_result (*get_parameter_string_for_value)(void* self, v3_param_id, double normalised, v3_str_128 output); | |||||
V3_API v3_result (*get_parameter_value_for_string)(void* self, v3_param_id, int16_t* input, double* output); | |||||
V3_API double (*normalised_parameter_to_plain)(void* self, v3_param_id, double normalised); | |||||
V3_API double (*plain_parameter_to_normalised)(void* self, v3_param_id, double plain); | |||||
V3_API double (*get_parameter_normalised)(void* self, v3_param_id); | |||||
V3_API v3_result (*set_parameter_normalised)(void* self, v3_param_id, double normalised); | |||||
V3_API v3_result (*set_component_handler)(void* self, struct v3_component_handler**); | |||||
V3_API struct v3_plugin_view **(*create_view)(void* self, const char* name); | |||||
v3_result (V3_API *set_component_state)(void* self, struct v3_bstream*); | |||||
v3_result (V3_API *set_state)(void* self, struct v3_bstream*); | |||||
v3_result (V3_API *get_state)(void* self, struct v3_bstream*); | |||||
int32_t (V3_API *get_parameter_count)(void* self); | |||||
v3_result (V3_API *get_parameter_info)(void* self, int32_t param_idx, struct v3_param_info*); | |||||
v3_result (V3_API *get_parameter_string_for_value)(void* self, v3_param_id, double normalised, v3_str_128 output); | |||||
v3_result (V3_API *get_parameter_value_for_string)(void* self, v3_param_id, int16_t* input, double* output); | |||||
double (V3_API *normalised_parameter_to_plain)(void* self, v3_param_id, double normalised); | |||||
double (V3_API *plain_parameter_to_normalised)(void* self, v3_param_id, double plain); | |||||
double (V3_API *get_parameter_normalised)(void* self, v3_param_id); | |||||
v3_result (V3_API *set_parameter_normalised)(void* self, v3_param_id, double normalised); | |||||
v3_result (V3_API *set_component_handler)(void* self, struct v3_component_handler**); | |||||
struct v3_plugin_view** (V3_API *create_view)(void* self, const char* name); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_edit_controller_iid = | static constexpr const v3_tuid v3_edit_controller_iid = | ||||
@@ -137,9 +137,9 @@ struct v3_event { | |||||
struct v3_event_list { | struct v3_event_list { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API uint32_t (*get_event_count)(void* self); | |||||
V3_API v3_result (*get_event)(void* self, int32_t idx, struct v3_event* event); | |||||
V3_API v3_result (*add_event)(void* self, struct v3_event* event); | |||||
uint32_t (V3_API *get_event_count)(void* self); | |||||
v3_result (V3_API *get_event)(void* self, int32_t idx, struct v3_event* event); | |||||
v3_result (V3_API *add_event)(void* self, struct v3_event* event); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_event_list_iid = | static constexpr const v3_tuid v3_event_list_iid = | ||||
@@ -39,10 +39,10 @@ struct v3_class_info { | |||||
struct v3_plugin_factory { | struct v3_plugin_factory { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*get_factory_info)(void* self, struct v3_factory_info*); | |||||
V3_API int32_t (*num_classes)(void* self); | |||||
V3_API v3_result (*get_class_info)(void* self, int32_t idx, struct v3_class_info*); | |||||
V3_API v3_result (*create_instance)(void* self, const v3_tuid class_id, const v3_tuid iid, void** instance); | |||||
v3_result (V3_API *get_factory_info)(void* self, struct v3_factory_info*); | |||||
int32_t (V3_API *num_classes)(void* self); | |||||
v3_result (V3_API *get_class_info)(void* self, int32_t idx, struct v3_class_info*); | |||||
v3_result (V3_API *create_instance)(void* self, const v3_tuid class_id, const v3_tuid iid, void** instance); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_factory_iid = | static constexpr const v3_tuid v3_plugin_factory_iid = | ||||
@@ -67,7 +67,7 @@ struct v3_class_info_2 { | |||||
struct v3_plugin_factory_2 { | struct v3_plugin_factory_2 { | ||||
struct v3_plugin_factory; | struct v3_plugin_factory; | ||||
V3_API v3_result (*get_class_info_2)(void* self, int32_t idx, struct v3_class_info_2*); | |||||
v3_result (V3_API *get_class_info_2)(void* self, int32_t idx, struct v3_class_info_2*); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_factory_2_iid = | static constexpr const v3_tuid v3_plugin_factory_2_iid = | ||||
@@ -95,8 +95,8 @@ struct v3_class_info_3 { | |||||
struct v3_plugin_factory_3 { | struct v3_plugin_factory_3 { | ||||
struct v3_plugin_factory_2; | struct v3_plugin_factory_2; | ||||
V3_API v3_result (*get_class_info_utf16)(void* self, int32_t idx, struct v3_class_info_3*); | |||||
V3_API v3_result (*set_host_context)(void* self, struct v3_funknown* host); | |||||
v3_result (V3_API *get_class_info_utf16)(void* self, int32_t idx, struct v3_class_info_3*); | |||||
v3_result (V3_API *set_host_context)(void* self, struct v3_funknown* host); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_factory_3_iid = | static constexpr const v3_tuid v3_plugin_factory_3_iid = | ||||
@@ -27,14 +27,14 @@ | |||||
struct v3_attribute_list { | struct v3_attribute_list { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*set_int)(void* self, const char* id, int64_t value); | |||||
V3_API v3_result (*get_int)(void* self, const char* id, int64_t* value); | |||||
V3_API v3_result (*set_float)(void* self, const char* id, double value); | |||||
V3_API v3_result (*get_float)(void* self, const char* id, double* value); | |||||
V3_API v3_result (*set_string)(void* self, const char* id, const int16_t* string); | |||||
V3_API v3_result (*get_string)(void* self, const char* id, int16_t* string, uint32_t size); | |||||
V3_API v3_result (*set_binary)(void* self, const char* id, const void* data, uint32_t size); | |||||
V3_API v3_result (*get_binary)(void* self, const char* id, const void** data, uint32_t* size); | |||||
v3_result (V3_API *set_int)(void* self, const char* id, int64_t value); | |||||
v3_result (V3_API *get_int)(void* self, const char* id, int64_t* value); | |||||
v3_result (V3_API *set_float)(void* self, const char* id, double value); | |||||
v3_result (V3_API *get_float)(void* self, const char* id, double* value); | |||||
v3_result (V3_API *set_string)(void* self, const char* id, const int16_t* string); | |||||
v3_result (V3_API *get_string)(void* self, const char* id, int16_t* string, uint32_t size); | |||||
v3_result (V3_API *set_binary)(void* self, const char* id, const void* data, uint32_t size); | |||||
v3_result (V3_API *get_binary)(void* self, const char* id, const void** data, uint32_t* size); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_attribute_list_iid = | static constexpr const v3_tuid v3_attribute_list_iid = | ||||
@@ -47,9 +47,9 @@ static constexpr const v3_tuid v3_attribute_list_iid = | |||||
struct v3_message { | struct v3_message { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API const char* (*get_message_id)(void* self); | |||||
V3_API void (*set_message_id)(void* self, const char* id); | |||||
V3_API v3_attribute_list** (*get_attributes)(void* self); | |||||
const char* (V3_API *get_message_id)(void* self); | |||||
void (V3_API *set_message_id)(void* self, const char* id); | |||||
v3_attribute_list** (V3_API *get_attributes)(void* self); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_message_iid = | static constexpr const v3_tuid v3_message_iid = | ||||
@@ -62,9 +62,9 @@ static constexpr const v3_tuid v3_message_iid = | |||||
struct v3_connection_point { | struct v3_connection_point { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*connect)(void* self, struct v3_connection_point** other); | |||||
V3_API v3_result (*disconnect)(void* self, struct v3_connection_point** other); | |||||
V3_API v3_result (*notify)(void* self, struct v3_message** message); | |||||
v3_result (V3_API *connect)(void* self, struct v3_connection_point** other); | |||||
v3_result (V3_API *disconnect)(void* self, struct v3_connection_point** other); | |||||
v3_result (V3_API *notify)(void* self, struct v3_message** message); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_connection_point_iid = | static constexpr const v3_tuid v3_connection_point_iid = | ||||
@@ -50,18 +50,18 @@ struct v3_plugin_frame; | |||||
struct v3_plugin_view { | struct v3_plugin_view { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*is_platform_type_supported)(void* self, const char* platform_type); | |||||
V3_API v3_result (*attached)(void* self, void* parent, const char* platform_type); | |||||
V3_API v3_result (*removed)(void* self); | |||||
V3_API v3_result (*on_wheel)(void* self, float distance); | |||||
V3_API v3_result (*on_key_down)(void* self, int16_t key_char, int16_t key_code, int16_t modifiers); | |||||
V3_API v3_result (*on_key_up)(void* self, int16_t key_char, int16_t key_code, int16_t modifiers); | |||||
V3_API v3_result (*get_size)(void* self, struct v3_view_rect*); | |||||
V3_API v3_result (*on_size)(void* self, struct v3_view_rect*); | |||||
V3_API v3_result (*on_focus)(void* self, v3_bool state); | |||||
V3_API v3_result (*set_frame)(void* self, struct v3_plugin_frame**); | |||||
V3_API v3_result (*can_resize)(void* self); | |||||
V3_API v3_result (*check_size_constraint)(void* self, struct v3_view_rect*); | |||||
v3_result (V3_API *is_platform_type_supported)(void* self, const char* platform_type); | |||||
v3_result (V3_API *attached)(void* self, void* parent, const char* platform_type); | |||||
v3_result (V3_API *removed)(void* self); | |||||
v3_result (V3_API *on_wheel)(void* self, float distance); | |||||
v3_result (V3_API *on_key_down)(void* self, int16_t key_char, int16_t key_code, int16_t modifiers); | |||||
v3_result (V3_API *on_key_up)(void* self, int16_t key_char, int16_t key_code, int16_t modifiers); | |||||
v3_result (V3_API *get_size)(void* self, struct v3_view_rect*); | |||||
v3_result (V3_API *on_size)(void* self, struct v3_view_rect*); | |||||
v3_result (V3_API *on_focus)(void* self, v3_bool state); | |||||
v3_result (V3_API *set_frame)(void* self, struct v3_plugin_frame**); | |||||
v3_result (V3_API *can_resize)(void* self); | |||||
v3_result (V3_API *check_size_constraint)(void* self, struct v3_view_rect*); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_view_iid = | static constexpr const v3_tuid v3_plugin_view_iid = | ||||
@@ -74,7 +74,7 @@ static constexpr const v3_tuid v3_plugin_view_iid = | |||||
struct v3_plugin_frame { | struct v3_plugin_frame { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*resize_view)(void* self, struct v3_plugin_view**, struct v3_view_rect*); | |||||
v3_result (V3_API *resize_view)(void* self, struct v3_plugin_view**, struct v3_view_rect*); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_frame_iid = | static constexpr const v3_tuid v3_plugin_frame_iid = | ||||
@@ -88,7 +88,7 @@ static constexpr const v3_tuid v3_plugin_frame_iid = | |||||
struct v3_plugin_view_content_scale { | struct v3_plugin_view_content_scale { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*set_content_scale_factor)(void* self, float factor); | |||||
v3_result (V3_API *set_content_scale_factor)(void* self, float factor); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_view_content_scale_iid = | static constexpr const v3_tuid v3_plugin_view_content_scale_iid = | ||||
@@ -101,7 +101,7 @@ static constexpr const v3_tuid v3_plugin_view_content_scale_iid = | |||||
struct v3_plugin_view_parameter_finder { | struct v3_plugin_view_parameter_finder { | ||||
struct v3_funknown; | struct v3_funknown; | ||||
V3_API v3_result (*find_parameter)(void* self, int32_t x, int32_t y, v3_param_id *); | |||||
v3_result (V3_API *find_parameter)(void* self, int32_t x, int32_t y, v3_param_id *); | |||||
}; | }; | ||||
static constexpr const v3_tuid v3_plugin_view_parameter_finder_iid = | static constexpr const v3_tuid v3_plugin_view_parameter_finder_iid = | ||||
@@ -2,7 +2,7 @@ | |||||
# ------------------------------ # | # ------------------------------ # | ||||
dpf_add_plugin(d_info | dpf_add_plugin(d_info | ||||
TARGETS jack lv2 vst2 | |||||
TARGETS jack lv2 vst2 vst3 | |||||
FILES_DSP | FILES_DSP | ||||
InfoExamplePlugin.cpp | InfoExamplePlugin.cpp | ||||
FILES_UI | FILES_UI | ||||
@@ -2,7 +2,7 @@ | |||||
# ------------------------------ # | # ------------------------------ # | ||||
dpf_add_plugin(d_latency | dpf_add_plugin(d_latency | ||||
TARGETS ladspa lv2 vst2 | |||||
TARGETS ladspa lv2 vst2 vst3 | |||||
FILES_DSP | FILES_DSP | ||||
LatencyExamplePlugin.cpp) | LatencyExamplePlugin.cpp) | ||||
@@ -2,7 +2,7 @@ | |||||
# ------------------------------ # | # ------------------------------ # | ||||
dpf_add_plugin(d_meters | dpf_add_plugin(d_meters | ||||
TARGETS jack dssi lv2 vst2 | |||||
TARGETS jack dssi lv2 vst2 vst3 | |||||
FILES_DSP | FILES_DSP | ||||
ExamplePluginMeters.cpp | ExamplePluginMeters.cpp | ||||
FILES_UI | FILES_UI | ||||
@@ -2,7 +2,7 @@ | |||||
# ------------------------------ # | # ------------------------------ # | ||||
dpf_add_plugin(d_midiThrough | dpf_add_plugin(d_midiThrough | ||||
TARGETS jack lv2 vst2 | |||||
TARGETS jack lv2 vst2 vst3 | |||||
FILES_DSP | FILES_DSP | ||||
MidiThroughExamplePlugin.cpp) | MidiThroughExamplePlugin.cpp) | ||||
@@ -2,7 +2,7 @@ | |||||
# ------------------------------ # | # ------------------------------ # | ||||
dpf_add_plugin(d_parameters | dpf_add_plugin(d_parameters | ||||
TARGETS jack ladspa dssi lv2 vst2 | |||||
TARGETS jack ladspa dssi lv2 vst2 vst3 | |||||
FILES_DSP | FILES_DSP | ||||
ExamplePluginParameters.cpp | ExamplePluginParameters.cpp | ||||
FILES_UI | FILES_UI | ||||
@@ -2,7 +2,7 @@ | |||||
# ------------------------------ # | # ------------------------------ # | ||||
dpf_add_plugin(d_states | dpf_add_plugin(d_states | ||||
TARGETS jack lv2 vst2 | |||||
TARGETS jack lv2 vst2 vst3 | |||||
FILES_DSP | FILES_DSP | ||||
ExamplePluginStates.cpp | ExamplePluginStates.cpp | ||||
FILES_UI | FILES_UI | ||||