summaryrefslogtreecommitdiff
path: root/src/drumkitloader.h
diff options
context:
space:
mode:
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;
};