diff options
author | David Robillard <d@drobilla.net> | 2012-05-31 06:47:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-31 06:47:21 +0000 |
commit | d9edf16e55663cb8374b370e370bdcc8f98284e8 (patch) | |
tree | 4e999d5bd42b10e90b8dd2f5a12580a345fa571c /src | |
parent | 7b20413c84b14d2c2bc1037bb08134dcdf152ddb (diff) | |
download | blop.lv2-d9edf16e55663cb8374b370e370bdcc8f98284e8.tar.gz blop.lv2-d9edf16e55663cb8374b370e370bdcc8f98284e8.tar.bz2 blop.lv2-d9edf16e55663cb8374b370e370bdcc8f98284e8.zip |
Fix memory errors.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blop.lv2@4490 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/fmod.c | 1 | ||||
-rw-r--r-- | src/lp4pole.c | 1 | ||||
-rw-r--r-- | src/quantiser.c | 12 | ||||
-rw-r--r-- | src/random.c | 2 |
4 files changed, 14 insertions, 2 deletions
@@ -118,6 +118,7 @@ instantiate(const LV2_Descriptor* descriptor, if (plugin) { plugin->frequency_is_cv = 0; plugin->modulator_is_cv = 0; + map_uris(&plugin->uris, features); } return (LV2_Handle)plugin; diff --git a/src/lp4pole.c b/src/lp4pole.c index 1997ae3..64d4bba 100644 --- a/src/lp4pole.c +++ b/src/lp4pole.c @@ -116,6 +116,7 @@ instantiate(const LV2_Descriptor* descriptor, } plugin->cutoff_is_cv = 0; plugin->resonance_is_cv = 0; + map_uris(&plugin->uris, features); } return (LV2_Handle)plugin; diff --git a/src/quantiser.c b/src/quantiser.c index 419467f..8607359 100644 --- a/src/quantiser.c +++ b/src/quantiser.c @@ -154,6 +154,14 @@ cleanup(LV2_Handle instance) } static void +activate(LV2_Handle instance) +{ + Quantiser* plugin = (Quantiser*)instance; + + plugin->last_found = 0.0f; +} + +static void connect_port(LV2_Handle instance, uint32_t port, void* data) @@ -246,7 +254,7 @@ run(LV2_Handle instance, float out_changed; float range; float offset; - float found; + float found = last_found; int found_index = 0; /* Clip count if out of range */ @@ -436,7 +444,7 @@ static const LV2_Descriptor descriptor = { QUANTISER_URI, instantiate, connect_port, - NULL, + activate, run, NULL, cleanup, diff --git a/src/random.c b/src/random.c index 1671854..2a4a7b7 100644 --- a/src/random.c +++ b/src/random.c @@ -122,6 +122,8 @@ instantiate(const LV2_Descriptor* descriptor, plugin->frequency_is_cv = 0; plugin->smooth_is_cv = 0; + map_uris(&plugin->uris, features); + return (LV2_Handle)plugin; } |