diff --git a/plugins/ladspa_effect/calf/src/calf/lv2wrap.h b/plugins/ladspa_effect/calf/src/calf/lv2wrap.h index 35f746bc7..ed2ccf8d7 100644 --- a/plugins/ladspa_effect/calf/src/calf/lv2wrap.h +++ b/plugins/ladspa_effect/calf/src/calf/lv2wrap.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -96,9 +96,11 @@ struct lv2_instance: public plugin_ctl_iface, public progress_report_iface assert(string_type); for (unsigned int i = 0; vars[i]; i++) { - size_t len = 0; - uint32_t type = 0; - const void *ptr = (*retrieve)(callback_data, vars[i], &len, &type); + const uint32_t key = uri_map->uri_to_id(uri_map, NULL, vars[i]); + size_t len = 0; + uint32_t type = 0; + uint32_t flags = 0; + const void *ptr = (*retrieve)(callback_data, key, &len, &type, &flags); if (ptr) { if (type != string_type) @@ -303,18 +305,25 @@ struct lv2_wrapper { LV2_Persist_Store_Function store; void *callback_data; + instance *inst; uint32_t string_data_type; virtual void send_configure(const char *key, const char *value) { - (*store)(callback_data, key, value, strlen(value) + 1, string_data_type); + (*store)(callback_data, + inst->uri_map->uri_to_id(inst->uri_map, NULL, key), + value, + strlen(value) + 1, + string_data_type, + LV2_PERSIST_IS_POD|LV2_PERSIST_IS_PORTABLE); } }; - // A host that supports a Persist extension should support an URI map extension as well. + // A host that supports Persist MUST support URI-Map as well. assert(inst->uri_map); store_state s; s.store = store; s.callback_data = callback_data; + s.inst = inst; s.string_data_type = inst->uri_map->uri_to_id(inst->uri_map, NULL, "http://lv2plug.in/ns/ext/atom#String"); inst->send_configures(&s); diff --git a/plugins/ladspa_effect/calf/src/modules_eq.cpp b/plugins/ladspa_effect/calf/src/modules_eq.cpp index 35a1a80d9..177b7fab9 100644 --- a/plugins/ladspa_effect/calf/src/modules_eq.cpp +++ b/plugins/ladspa_effect/calf/src/modules_eq.cpp @@ -38,6 +38,15 @@ equalizerNband_audio_module::equalizerNband_audio_module() is_active = false; srate = 0; last_generation = 0; + hp_freq_old = lp_freq_old = 0; + hs_freq_old = ls_freq_old = 0; + hs_level_old = ls_level_old = 0; + for (int i = 0; i < AM::PeakBands; i++) + { + p_freq_old[i] = 0; + p_level_old[i] = 0; + p_q_old[i] = 0; + } } template