aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/synthpod_alsa.c5
-rw-r--r--bin/synthpod_jack.c2
-rw-r--r--bin/synthpod_nsm.c10
-rw-r--r--lib/synthpod_app.c24
-rw-r--r--lib/synthpod_ui.c11
5 files changed, 33 insertions, 19 deletions
diff --git a/bin/synthpod_alsa.c b/bin/synthpod_alsa.c
index 6ff54970..ae1bde3f 100644
--- a/bin/synthpod_alsa.c
+++ b/bin/synthpod_alsa.c
@@ -485,7 +485,7 @@ _system_port_del(void *data, void *sys_port)
chan_t *chan = sys_port;
- if(!chan || !handle->seq)
+ if(!chan)
return;
switch(chan->type)
@@ -499,7 +499,8 @@ _system_port_del(void *data, void *sys_port)
case CHAN_TYPE_MIDI:
{
snd_midi_event_free(chan->midi.trans);
- snd_seq_delete_simple_port(handle->seq, chan->midi.port);
+ if(handle->seq)
+ snd_seq_delete_simple_port(handle->seq, chan->midi.port);
break;
}
diff --git a/bin/synthpod_jack.c b/bin/synthpod_jack.c
index 6ce12ee8..0462896c 100644
--- a/bin/synthpod_jack.c
+++ b/bin/synthpod_jack.c
@@ -422,7 +422,7 @@ _process(jack_nframes_t nsamples, void *data)
// get transport position
jack_position_t pos;
- int rolling = jack_transport_query(handle->client, &pos) == JackTransportRolling;
+ jack_transport_state_t rolling = jack_transport_query(handle->client, &pos) == JackTransportRolling;
int trans_changed = (rolling != handle->trans.rolling)
|| (pos.frame != handle->trans.frame)
|| (pos.beats_per_bar != handle->trans.beats_per_bar)
diff --git a/bin/synthpod_nsm.c b/bin/synthpod_nsm.c
index df5839b4..c95bee2c 100644
--- a/bin/synthpod_nsm.c
+++ b/bin/synthpod_nsm.c
@@ -151,7 +151,7 @@ _client_show_optional_gui(osc_time_t time, const char *path, const char *fmt, co
if(written)
ecore_con_server_send(nsm->serv, nsm->send, written);
else
- ; //TODO
+ fprintf(stderr, "OSC sending failed\n");
return 1;
}
@@ -179,7 +179,7 @@ _client_hide_optional_gui(osc_time_t time, const char *path, const char *fmt, co
if(written)
ecore_con_server_send(nsm->serv, nsm->send, written);
else
- ; //TODO
+ fprintf(stderr, "OSC sending failed\n");
return 1;
}
@@ -217,7 +217,7 @@ _announce(synthpod_nsm_t *nsm)
if(written)
ecore_con_server_send(nsm->serv, nsm->send, written);
else
- ; //TODO
+ fprintf(stderr, "OSC sending failed\n");
}
static const osc_method_t methods [] = {
@@ -431,7 +431,7 @@ synthpod_nsm_opened(synthpod_nsm_t *nsm, int status)
if(written)
ecore_con_server_send(nsm->serv, nsm->send, written);
else
- ; //TODO
+ fprintf(stderr, "OSC sending failed\n");
}
void
@@ -458,7 +458,7 @@ synthpod_nsm_saved(synthpod_nsm_t *nsm, int status)
if(written)
ecore_con_server_send(nsm->serv, nsm->send, written);
else
- ; //TODO
+ fprintf(stderr, "OSC sending failed\n");
}
int
diff --git a/lib/synthpod_app.c b/lib/synthpod_app.c
index 8c02cc90..d04582d6 100644
--- a/lib/synthpod_app.c
+++ b/lib/synthpod_app.c
@@ -592,7 +592,7 @@ _mod_slice_pool(mod_t *mod, port_type_t type)
// non-rt worker-thread
static inline mod_t *
-_sp_app_mod_add(sp_app_t *app, const char *uri, uint32_t uid)
+_sp_app_mod_add(sp_app_t *app, const char *uri, u_id_t uid)
{
LilvNode *uri_node = lilv_new_uri(app->world, uri);
if(!uri_node)
@@ -811,12 +811,17 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, uint32_t uid)
//FIXME check lilv returns
char *short_name = NULL;
char *pretty_name = NULL;
+ const LilvNode *port_symbol_node = lilv_port_get_symbol(plug, port);
+ LilvNode *port_name_node = lilv_port_get_name(plug, port);
+
asprintf(&short_name, "plugin_%u_%s",
- mod->uid, lilv_node_as_string(lilv_port_get_symbol(plug, port)));
+ mod->uid, lilv_node_as_string(port_symbol_node));
asprintf(&pretty_name, "Plugin %u - %s",
- mod->uid, lilv_node_as_string(lilv_port_get_name(plug, port)));
+ mod->uid, lilv_node_as_string(port_name_node));
tar->sys.data = app->driver->system_port_add(app->data, tar->sys.type,
short_name, pretty_name, tar->direction == PORT_DIRECTION_OUTPUT);
+
+ lilv_node_free(port_name_node);
free(short_name);
free(pretty_name);
}
@@ -885,7 +890,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, uint32_t uid)
tar->selected = control_port == port; // only select control ports by default
}
else
- ; //TODO
+ fprintf(stderr, "unknown port type\n");
// get minimum port size if specified
LilvNode *minsize = lilv_port_get(plug, port, app->regs.port.minimum_size.node);
@@ -1180,7 +1185,7 @@ sp_app_new(const LilvWorld *world, sp_app_driver_t *driver, void *data)
app->num_mods += 1;
}
else
- ; //TODO report
+ fprintf(stderr, "failed to create system source\n");
// inject sink mod
uri_str = SYNTHPOD_PREFIX"sink";
@@ -1191,7 +1196,7 @@ sp_app_new(const LilvWorld *world, sp_app_driver_t *driver, void *data)
app->num_mods += 1;
}
else
- ; //TODO report
+ fprintf(stderr, "failed to create system sink\n");
app->fps.bound = driver->sample_rate / 24; //TODO make this configurable
app->fps.counter = 0;
@@ -2740,6 +2745,11 @@ sp_app_free(sp_app_t *app)
if(!app->embedded)
lilv_world_free(app->world);
+ if(app->bundle_path)
+ free(app->bundle_path);
+ if(app->bundle_filename)
+ free(app->bundle_filename);
+
eina_semaphore_free(&app->bypass_sem);
free(app);
@@ -3158,7 +3168,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE, features);
}
else
- ; //TODO
+ fprintf(stderr, "failed to load state from file\n");
lilv_state_free(state);
free(path);
diff --git a/lib/synthpod_ui.c b/lib/synthpod_ui.c
index 7503761c..92dfd3ad 100644
--- a/lib/synthpod_ui.c
+++ b/lib/synthpod_ui.c
@@ -458,7 +458,7 @@ _std_port_event(LV2UI_Handle handle, uint32_t index, uint32_t size,
}
}
else
- ; //TODO atom
+ fprintf(stderr, "unknown protocol\n");
}
static inline void
@@ -1801,6 +1801,9 @@ _sp_ui_mod_del(sp_ui_t *ui, mod_t *mod)
if(mod->ports)
free(mod->ports);
+ if(mod->presets)
+ lilv_nodes_free(mod->presets);
+
if(mod->std.itm == ui->sink_itm)
ui->sink_itm = 0;
@@ -2765,8 +2768,7 @@ _modlist_content_get(void *data, Evas_Object *obj, const char *part)
elm_layout_content_set(lay, "elm.swallow.end", icon);
} // icon
}
- else
- ; // system mods cannot be removed
+ // system mods cannot be removed
if(mod->show.ui || mod->kx.ui || mod->eo.ui || mod->x11.ui) //TODO also check for descriptor
{
@@ -3424,11 +3426,12 @@ _modlist_std_content_get(void *data, Evas_Object *obj, const char *part)
}
} // dir
- const LilvNode *name_node = lilv_port_get_name(mod->plug, port->tar);
+ LilvNode *name_node = lilv_port_get_name(mod->plug, port->tar);
if(name_node)
{
const char *type_str = lilv_node_as_string(name_node);
elm_layout_text_set(lay, "elm.text", type_str);
+ lilv_node_free(name_node);
}
Evas_Object *child = NULL;