From 65917893e5e5abf3e0275b7205c6fce605c81a17 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 24 Feb 2012 22:34:37 +0000 Subject: Fix loading of initial sample. --- plugins/eg-sampler.lv2/sampler.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c index fdd5661..b7851cc 100644 --- a/plugins/eg-sampler.lv2/sampler.c +++ b/plugins/eg-sampler.lv2/sampler.c @@ -289,12 +289,12 @@ instantiate(const LV2_Descriptor* descriptor, zix_ring_mlock(plugin->from_worker); /* Load the default sample file */ - const size_t path_len = strlen(path); - const size_t file_len = strlen(default_sample_file); - const size_t len = strlen("file://") + path_len + file_len; - char* sample_uri = (char*)malloc(len + 1); - snprintf(sample_uri, len + 1, "file://%s%s", path, default_sample_file); - plugin->sample = load_sample(plugin, sample_uri); + const size_t path_len = strlen(path); + const size_t file_len = strlen(default_sample_file); + const size_t len = path_len + file_len; + char* sample_path = (char*)malloc(len + 1); + snprintf(sample_path, len + 1, "%s%s", path, default_sample_file); + plugin->sample = load_sample(plugin, sample_path); return (LV2_Handle)plugin; -- cgit v1.2.1