summaryrefslogtreecommitdiff
path: root/src/drumkitloader.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-04-16 13:33:53 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-04-16 13:33:53 +0200
commit4eb252df04ab237c8638d45bcbf028859dc6a110 (patch)
tree8bffddf62b4271336a6e0121fef8133327654000 /src/drumkitloader.h
parentef68248bf70a027595803b08433a7a2c74e20fd0 (diff)
parent35e804b984c28131fe13d229c5a0867762c6e8cf (diff)
Merge branch 'settings'
Diffstat (limited to 'src/drumkitloader.h')
-rw-r--r--src/drumkitloader.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/drumkitloader.h b/src/drumkitloader.h
index 3656839..3fd7ec1 100644
--- a/src/drumkitloader.h
+++ b/src/drumkitloader.h
@@ -28,12 +28,14 @@
#include <string>
#include <list>
+#include <mutex>
+#include "mutex.h"
#include "thread.h"
#include "semaphore.h"
-#include "mutex.h"
#include "drumkit.h"
+#include "settings.h"
//! This class is responsible for loading the drumkits in its own thread.
//! All interaction calls are simply modifying queues and not doing any
@@ -45,7 +47,7 @@ class DrumKitLoader
{
public:
//! The constrcutor starts the loader thread.
- DrumKitLoader();
+ DrumKitLoader(Settings& settings);
//! The destructor signals the thread to stop and waits to merge before
//! returning (ie. deleting the object will garantuee that the thread has
@@ -75,11 +77,11 @@ protected:
Semaphore run_semaphore;
Semaphore semaphore;
Semaphore framesize_semaphore;
- Mutex mutex;
+ std::mutex mutex;
volatile bool running{false};
std::list<AudioFile*> load_queue;
- size_t total_num_audiofiles{0};
- size_t fraction{1};
- size_t loaded{0};
- size_t framesize{0};
+ std::size_t loaded{0};
+ std::size_t framesize{0};
+ Settings& settings;
+ SettingsGetter getter;
};