summaryrefslogtreecommitdiff
path: root/src/cachemanager.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 10:34:21 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-01-20 13:28:48 +0100
commit60cd3f9dc45b194198198591a7bf48e2d8afb16c (patch)
tree1f32bc03dbd42da23f5c4707f8aa9d51f1193eb3 /src/cachemanager.h
parentfd501c7dc4042ce993b16a2d079d5b05af2ecb07 (diff)
Added framesize control mechanism to the engine, and made us of it in the cachemanager and drumkitloader.
Diffstat (limited to 'src/cachemanager.h')
-rw-r--r--src/cachemanager.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cachemanager.h b/src/cachemanager.h
index f2c0122..d98d66c 100644
--- a/src/cachemanager.h
+++ b/src/cachemanager.h
@@ -41,9 +41,7 @@
#define CACHE_DUMMYID -2
#define CACHE_NOID -1
-#define FRAMESIZE 2048
-#define CHUNKSIZE (FRAMESIZE * 16)
-#define PRELOADSIZE (FRAMESIZE + CHUNKSIZE)
+#define CHUNK_MULTIPLIER 16
class AudioFile;
typedef int cacheid_t;
@@ -131,10 +129,15 @@ public:
*/
void close(cacheid_t id);
+ void setFrameSize(size_t framesize);
+
///! Internal thread main method - needs to be public.
void thread_main();
private:
+ size_t framesize;
+ sample_t *nodata;
+
typedef struct {
AudioFile *file;
size_t channel;