summaryrefslogtreecommitdiff
path: root/src/LV2-render.c
diff options
context:
space:
mode:
authorpepper <peppersclothescult@gmail.com>2015-01-31 18:13:31 -0800
committerpepper <peppersclothescult@gmail.com>2015-01-31 18:13:31 -0800
commit3c3d53e0c88a041f9e1febfea17543f01a2ac1d5 (patch)
treeed84cfe2dc3f80771997948a6602ed2e85452ee1 /src/LV2-render.c
parentf2a5461bccc641c99ef6d8569a1e0484e279c1e3 (diff)
fixed tempdir issue...everything works...need to move onHEADmaster
Diffstat (limited to 'src/LV2-render.c')
-rw-r--r--src/LV2-render.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/LV2-render.c b/src/LV2-render.c
index 124c6dd..2dd8b40 100644
--- a/src/LV2-render.c
+++ b/src/LV2-render.c
@@ -227,6 +227,7 @@ int process_midi_cb(fluid_midi_event_t *event, size_t msecs, process_midi_ctx_t
fprintf(stderr, "ERROR: Incompatible number of channels and output ports.\n");
fprintf(stderr, "Audio Output Ports: %d\n", pluginAudioOutputCount);
fprintf(stderr, "Channels: %d\n", nchannels);
+ remove(jalv->temp_dir);
exit(1);
}
@@ -599,10 +600,12 @@ main(int argc, char** argv)
//make sure input and output exist
if(access(jalv.opts.infile, FILE_OK)){
fprintf(stderr, "ERROR:Could not find %s\n Please specify an input file with -i\n", jalv.opts.infile);
+ remove(jalv.temp_dir);
exit(1);
}
if(!access(jalv.opts.outfile, WRITE_OK)){
fprintf(stderr, "ERROR:Could not write to %s\n.", jalv.opts.outfile);
+ remove(jalv.temp_dir);
exit(1);
}
@@ -655,12 +658,13 @@ main(int argc, char** argv)
jalv.urids.ui_updateRate = symap_map(jalv.symap, LV2_UI__updateRate);
+//TODO
#ifdef _WIN32
- jalv.temp_dir = jalv_strdup("jalvXXXXXX");
+ jalv.temp_dir = jalv_strdup("LV2renderXXXXXX");
_mktemp(jalv.temp_dir);
#else
- char* templ = jalv_strdup("/tmp/jalv-XXXXXX");
+ char* templ = jalv_strdup("/tmp/LV2-render-XXXXXX");
jalv.temp_dir = jalv_strjoin(mkdtemp(templ), "/");
free(templ);
#endif
@@ -831,6 +835,7 @@ main(int argc, char** argv)
if (lilv_plugin_has_feature(jalv.plugin, jalv.nodes.work_schedule) // can we check if amsynth has this work_schedule feature? hmm yeah we should check via LV2-render, right? yeah
&& lilv_plugin_has_extension_data(jalv.plugin, jalv.nodes.work_interface)) {
printf("NEEDS TO USE A WORKER!\n");
+ remove(jalv.temp_dir);
exit(1);
}