summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-05-22 16:44:11 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-05-22 16:44:11 +0200
commit624d25b8c3e9bd1648fdadbe28e1859cecab494f (patch)
treeac2331735a1e87e1fd5b49b3849542b0862b4453 /src/drumgizmo.cc
parent07415bae4e84a4c9316249f14c26c695c5dcadaa (diff)
Explicitly stop the loader thread to ensure we don't delete the DrumGizmo::drumkit member while the loader is attached to it.
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 03b17bf..6c639b8 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -62,10 +62,12 @@ DrumGizmo::DrumGizmo(Settings& settings,
{
audioCache.init(10000); // start thread
events.reserve(1000);
+ loader.init();
}
DrumGizmo::~DrumGizmo()
{
+ loader.deinit();
audioCache.deinit(); // stop thread
}