No need for activate/deactive. Free when more than one prefix on knob is set

This commit is contained in:
Nick Lanham 2012-02-25 11:33:22 +01:00
parent d3cc0531bf
commit b9d1bc7040
2 changed files with 3 additions and 5 deletions

7
drmr.c
View File

@ -272,9 +272,6 @@ static void run(LV2_Handle instance, uint32_t n_samples) {
pthread_mutex_unlock(&drmr->load_mutex); pthread_mutex_unlock(&drmr->load_mutex);
} }
static void activate (LV2_Handle instance) {}
static void deactivate(LV2_Handle instance) {}
static void cleanup(LV2_Handle instance) { static void cleanup(LV2_Handle instance) {
DrMr* drmr = (DrMr*)instance; DrMr* drmr = (DrMr*)instance;
pthread_cancel(drmr->load_thread); pthread_cancel(drmr->load_thread);
@ -294,9 +291,9 @@ static const LV2_Descriptor descriptor = {
DRMR_URI, DRMR_URI,
instantiate, instantiate,
connect_port, connect_port,
activate, NULL, // activate
run, run,
deactivate, NULL, // deactivate
cleanup, cleanup,
extension_data extension_data
}; };

View File

@ -206,6 +206,7 @@ GtkWidget* n_knob_new_with_range (gdouble value, gdouble lower,
} }
void n_knob_set_load_prefix(NKnob* knob, gchar* prefix) { void n_knob_set_load_prefix(NKnob* knob, gchar* prefix) {
if (knob->load_prefix) g_free(knob->load_prefix);
knob->load_prefix = g_strdup(prefix); knob->load_prefix = g_strdup(prefix);
} }
gchar* n_knob_get_load_prefix(NKnob* knob) { gchar* n_knob_get_load_prefix(NKnob* knob) {