diff options
-rw-r--r-- | bin/synthpod_alsa.c | 42 | ||||
-rw-r--r-- | bin/synthpod_jack.c | 5 | ||||
-rw-r--r-- | bin/synthpod_nsm.c | 13 | ||||
-rw-r--r-- | lib/synthpod_ui.c | 4 |
4 files changed, 40 insertions, 24 deletions
diff --git a/bin/synthpod_alsa.c b/bin/synthpod_alsa.c index a9c1be80..00b1ee27 100644 --- a/bin/synthpod_alsa.c +++ b/bin/synthpod_alsa.c @@ -554,21 +554,32 @@ _alsa_init(prog_t *handle, const char *id) static void _alsa_deinit(prog_t *handle) { - handle->kill = 1; - eina_thread_join(handle->thread); + if(handle->thread) + { + handle->kill = 1; + eina_thread_join(handle->thread); + } - pcmi_free(handle->pcmi); - handle->pcmi = NULL; - - if(snd_seq_drain_output(handle->seq)) - fprintf(stderr, "draining output failed\n"); - snd_seq_stop_queue(handle->seq, handle->queue, NULL); - if(snd_seq_free_queue(handle->seq, handle->queue)) - fprintf(stderr, "freeing queue failed\n"); - if(snd_seq_close(handle->seq)) - fprintf(stderr, "close sequencer failed\n"); - handle->seq = NULL; - handle->queue = 0; + if(handle->pcmi) + { + pcmi_free(handle->pcmi); + + handle->pcmi = NULL; + } + + if(handle->seq) + { + if(snd_seq_drain_output(handle->seq)) + fprintf(stderr, "draining output failed\n"); + snd_seq_stop_queue(handle->seq, handle->queue, NULL); + if(snd_seq_free_queue(handle->seq, handle->queue)) + fprintf(stderr, "freeing queue failed\n"); + if(snd_seq_close(handle->seq)) + fprintf(stderr, "close sequencer failed\n"); + + handle->seq = NULL; + handle->queue = 0; + } } static int @@ -584,7 +595,10 @@ _open(const char *path, const char *name, const char *id, void *data) // alsa init if(_alsa_init(handle, id)) + { + bin->ui_driver.close(bin); return -1; + } // synthpod init bin->app_driver.sample_rate = handle->srate; diff --git a/bin/synthpod_jack.c b/bin/synthpod_jack.c index 0462896c..f8aca05d 100644 --- a/bin/synthpod_jack.c +++ b/bin/synthpod_jack.c @@ -885,7 +885,7 @@ _xrun(void *data) static int _jack_init(prog_t *handle, const char *id) { - jack_options_t opts = JackNullOption; + jack_options_t opts = JackNullOption | JackNoStartServer; if(handle->server_name) opts |= JackServerName; if(handle->session_id) @@ -959,7 +959,10 @@ _open(const char *path, const char *name, const char *id, void *data) // jack init if(_jack_init(handle, id)) + { + bin->ui_driver.close(bin); return -1; + } // synthpod init bin->app_driver.sample_rate = jack_get_sample_rate(handle->client); diff --git a/bin/synthpod_nsm.c b/bin/synthpod_nsm.c index c95bee2c..c7c25d21 100644 --- a/bin/synthpod_nsm.c +++ b/bin/synthpod_nsm.c @@ -110,7 +110,7 @@ _client_open(osc_time_t time, const char *path, const char *fmt, const osc_data_ // open/create app if(nsm->driver->open(dir, name, id, nsm->data)) - fprintf(stderr, "NSM load failed\n"); + fprintf(stderr, "NSM load failed: '%s'\n", dir); return 1; } @@ -123,7 +123,7 @@ _client_save(osc_time_t time, const char *path, const char *fmt, const osc_data_ // save app if(nsm->driver->save(nsm->data)) - fprintf(stderr, "NSM save failed\n"); + fprintf(stderr, "NSM save failed:\n"); return 1; } @@ -328,7 +328,7 @@ synthpod_nsm_new(const char *exe, const char *path, if(sscanf(dst, "%hu", &port) != 1) goto fail; - printf("addr: %s, dst: %hu\n", addr, port); + printf("NSM URL: %s, dst: %hu\n", addr, port); nsm->serv = ecore_con_server_connect(type, addr, port, nsm); @@ -348,7 +348,8 @@ synthpod_nsm_new(const char *exe, const char *path, if(path) { - nsm->driver->open(path, nsm->call, nsm->exe, nsm->data); + if(nsm->driver->open(path, nsm->call, nsm->exe, nsm->data)) + fprintf(stderr, "NSM load failed: '%s'\n", path); } else { @@ -360,8 +361,8 @@ synthpod_nsm_new(const char *exe, const char *path, { ecore_file_mkpath(synthpod_dir); - nsm->driver->open(synthpod_dir, - nsm->call, nsm->exe, nsm->data); + if(nsm->driver->open(synthpod_dir, nsm->call, nsm->exe, nsm->data)) + fprintf(stderr, "NSM load failed: '%s'\n", synthpod_dir); free(synthpod_dir); } diff --git a/lib/synthpod_ui.c b/lib/synthpod_ui.c index 92dfd3ad..e7b7faea 100644 --- a/lib/synthpod_ui.c +++ b/lib/synthpod_ui.c @@ -4724,14 +4724,12 @@ sp_ui_new(Evas_Object *win, const LilvWorld *world, sp_ui_driver_t *driver, if(ui->statusline) { //TODO use - elm_object_text_set(ui->statusline, "[status]"); + elm_object_text_set(ui->statusline, ""); evas_object_size_hint_weight_set(ui->statusline, EVAS_HINT_EXPAND, 0.f); evas_object_size_hint_align_set(ui->statusline, 0.f, 1.f); evas_object_show(ui->statusline); elm_table_pack(ui->table, ui->statusline, 0, 2, 1, 1); } // statusline - - //TODO add info button } // theme } |