summaryrefslogtreecommitdiff
path: root/synth/note_loader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'synth/note_loader.cpp')
-rw-r--r--synth/note_loader.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/synth/note_loader.cpp b/synth/note_loader.cpp
index b7ccc99..28613b9 100644
--- a/synth/note_loader.cpp
+++ b/synth/note_loader.cpp
@@ -42,3 +42,13 @@ void load_note_from_so(string file, program_t &prog)
throw err;
}
}
+
+void maybe_unload_note(program_t &prog)
+{
+ if (prog.dl_handle)
+ {
+ dlclose(prog.dl_handle);
+ prog.dl_handle=NULL;
+ prog.create_func=NULL;
+ }
+}