CALF: updated up to commit b22ca910642433a4507f33ec08bcbf8e6d02e3ff
* Fix broken band issue in EQ plugins. * Persist extension 0.2
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <lv2.h>
|
||||
#include <calf/giface.h>
|
||||
#include <calf/lv2_event.h>
|
||||
#include <calf/lv2_persist2.h>
|
||||
#include <calf/lv2_persist.h>
|
||||
#include <calf/lv2_progress.h>
|
||||
#include <calf/lv2_uri_map.h>
|
||||
#include <string.h>
|
||||
@@ -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);
|
||||
|
||||
@@ -38,6 +38,15 @@ equalizerNband_audio_module<BaseClass, has_lphp>::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<class BaseClass, bool has_lphp>
|
||||
|
||||
Reference in New Issue
Block a user