summaryrefslogtreecommitdiff
path: root/drumgizmo/audiooutputenginedl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'drumgizmo/audiooutputenginedl.cc')
-rw-r--r--drumgizmo/audiooutputenginedl.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/drumgizmo/audiooutputenginedl.cc b/drumgizmo/audiooutputenginedl.cc
index fc887df..2e573cd 100644
--- a/drumgizmo/audiooutputenginedl.cc
+++ b/drumgizmo/audiooutputenginedl.cc
@@ -36,7 +36,7 @@ AudioOutputEngineDL::AudioOutputEngineDL(std::string name)
is_jack_plugin = strstr(name.c_str(), "jack");
std::string plugin = OUTPUT_PLUGIN_DIR"/" + name + ".so";
- void *lib = dlopen(plugin.c_str(), RTLD_LAZY);
+ lib = dlopen(plugin.c_str(), RTLD_LAZY);
if(!lib) {
printf("Cannot load device: %s\n", dlerror());
return;
@@ -132,6 +132,8 @@ AudioOutputEngineDL::~AudioOutputEngineDL()
{
o_destroy(ptr);
if(is_jack_plugin) close_jack_client();
+ dlclose(lib);
+ lib = nullptr;
}
bool AudioOutputEngineDL::init(Channels channels)