File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,17 @@ static void* load_thread(void* arg) {
3131 DrMr * drmr = (DrMr * )arg ;
3232 drmr_sample * loaded_samples ,* old_samples ;
3333 int loaded_count , old_scount ;
34- char * request ;
34+ char * request , * request_orig ;
3535 for (;;) {
3636 pthread_mutex_lock (& drmr -> load_mutex );
3737 pthread_cond_wait (& drmr -> load_cond ,
3838 & drmr -> load_mutex );
3939 pthread_mutex_unlock (& drmr -> load_mutex );
4040 old_samples = drmr -> samples ;
4141 old_scount = drmr -> num_samples ;
42- request = drmr -> request_buf [drmr -> curReq ];
42+ request_orig = request = drmr -> request_buf [drmr -> curReq ];
43+ if (!strncmp (request , "file://" , 7 ))
44+ request += 7 ;
4345 loaded_samples = load_hydrogen_kit (request ,drmr -> rate ,& loaded_count );
4446 if (!loaded_samples ) {
4547 fprintf (stderr ,"Failed to load kit at: %s\n" ,request );
@@ -57,7 +59,7 @@ static void* load_thread(void* arg) {
5759 pthread_mutex_unlock (& drmr -> load_mutex );
5860 }
5961 if (old_scount > 0 ) free_samples (old_samples ,old_scount );
60- drmr -> current_path = request ;
62+ drmr -> current_path = request_orig ;
6163 current_kit_changed = 1 ;
6264 }
6365 return 0 ;
Original file line number Diff line number Diff line change @@ -723,6 +723,8 @@ port_event(LV2UI_Handle handle,
723723 lv2_atom_object_get (obj , ui -> uris .kit_path , & path , 0 );
724724 if (path ) {
725725 char * kitpath = LV2_ATOM_BODY (path );
726+ if (!strncmp (kitpath , "file://" , 7 ))
727+ kitpath += 7 ;
726728 char * realp = realpath (kitpath ,NULL );
727729 if (!realp ) {
728730 fprintf (stderr ,"Passed a path I can't resolve, bailing out\n" );
You can’t perform that action at this time.
0 commit comments