Signed-off-by: falkTX <falktx@falktx.com>wayland-v2
| @@ -452,7 +452,7 @@ SYMBOLS_LADSPA = -sEXPORTED_FUNCTIONS="['ladspa_descriptor']" | |||||
| SYMBOLS_LV2 = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl','lv2ui_descriptor']" | SYMBOLS_LV2 = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl','lv2ui_descriptor']" | ||||
| SYMBOLS_LV2DSP = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl']" | SYMBOLS_LV2DSP = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl']" | ||||
| SYMBOLS_LV2UI = -sEXPORTED_FUNCTIONS="['lv2ui_descriptor']" | SYMBOLS_LV2UI = -sEXPORTED_FUNCTIONS="['lv2ui_descriptor']" | ||||
| SYMBOLS_MAPI = -sEXPORTED_FUNCTIONS="['_malloc','_free','_mapi_create','_mapi_process','_mapi_set_parameter','_mapi_set_state','_mapi_destroy']" | |||||
| SYMBOLS_MAPI = -sEXPORTED_FUNCTIONS="['_malloc','_free','_mapi_create','_mapi_process','_mapi_get_parameter','_mapi_set_parameter','_mapi_set_state','_mapi_destroy']" | |||||
| SYMBOLS_VST2 = -sEXPORTED_FUNCTIONS="['VSTPluginMain']" | SYMBOLS_VST2 = -sEXPORTED_FUNCTIONS="['VSTPluginMain']" | ||||
| SYMBOLS_VST3 = -sEXPORTED_FUNCTIONS="['GetPluginFactory','ModuleEntry','ModuleExit']" | SYMBOLS_VST3 = -sEXPORTED_FUNCTIONS="['GetPluginFactory','ModuleEntry','ModuleExit']" | ||||
| else ifeq ($(WINDOWS),true) | else ifeq ($(WINDOWS),true) | ||||
| @@ -64,6 +64,11 @@ public: | |||||
| updateParameterOutputsAndTriggers(); | updateParameterOutputsAndTriggers(); | ||||
| } | } | ||||
| float getParameter(unsigned int index) const | |||||
| { | |||||
| return fPlugin.getParameterValue(index); | |||||
| } | |||||
| void setParameter(unsigned int index, float value) | void setParameter(unsigned int index, float value) | ||||
| { | { | ||||
| fPlugin.setParameterValue(index, fPlugin.getParameterRanges(index).getFixedValue(value)); | fPlugin.setParameterValue(index, fPlugin.getParameterRanges(index).getFixedValue(value)); | ||||
| @@ -135,6 +140,12 @@ void mapi_process(mapi_handle_t handle, | |||||
| static_cast<PluginMAPI*>(handle)->process(ins, outs, frames); | static_cast<PluginMAPI*>(handle)->process(ins, outs, frames); | ||||
| } | } | ||||
| MAPI_EXPORT | |||||
| float mapi_get_parameter(mapi_handle_t handle, unsigned int index) | |||||
| { | |||||
| return static_cast<PluginMAPI*>(handle)->getParameter(index); | |||||
| } | |||||
| MAPI_EXPORT | MAPI_EXPORT | ||||
| void mapi_set_parameter(mapi_handle_t handle, unsigned int index, float value) | void mapi_set_parameter(mapi_handle_t handle, unsigned int index, float value) | ||||
| { | { | ||||
| @@ -43,6 +43,15 @@ void mapi_process(mapi_handle_t handle, | |||||
| float** outs, | float** outs, | ||||
| unsigned int frames); | unsigned int frames); | ||||
| /** | |||||
| Get an effect parameter. | |||||
| @param handle A previously created effect. | |||||
| @param index A known index for this effect. | |||||
| @return value A full-ranged value. | |||||
| */ | |||||
| MAPI_EXPORT | |||||
| float mapi_get_parameter(mapi_handle_t handle, unsigned int index); | |||||
| /** | /** | ||||
| Set an effect parameter. | Set an effect parameter. | ||||
| @param handle A previously created effect. | @param handle A previously created effect. | ||||