summaryrefslogtreecommitdiff
path: root/src/drumkitloader.h
diff options
context:
space:
mode:
author- <nemo@alice.(none)>2013-05-09 17:54:45 +0200
committer- <nemo@alice.(none)>2013-05-09 17:54:45 +0200
commit774815a97901fe9d5ce2767a8c479c52a5ad0ce8 (patch)
tree325793f2c2f76d2efe3af3d980005d074af035f8 /src/drumkitloader.h
parenta4d73c0cb2321bd61bd31d2922ae469389e5825e (diff)
Lazy load of audio. Unloads when there's nothing else to do.
Diffstat (limited to 'src/drumkitloader.h')
-rw-r--r--src/drumkitloader.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drumkitloader.h b/src/drumkitloader.h
index 50b8236..9d14638 100644
--- a/src/drumkitloader.h
+++ b/src/drumkitloader.h
@@ -28,6 +28,7 @@
#define __DRUMGIZMO_DRUMKITLOADER_H__
#include <string>
+#include <list>
#include "thread.h"
#include "semaphore.h"
@@ -43,6 +44,9 @@ public:
~DrumKitLoader();
void loadKit(DrumKit *kit);
+
+ void prepare(AudioFile* af);
+ void reset(AudioFile* af);
void thread_main();
@@ -60,6 +64,9 @@ private:
Mutex mutex;
volatile bool quitit;
volatile bool skipit;
+ std::list<AudioFile*> load_queue;
+ std::list<AudioFile*> reset_queue;
+ std::map<AudioFile*, int> ref_count;
};
#endif/*__DRUMGIZMO_DRUMKITLOADER_H__*/