diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-01-23 20:10:26 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-01-23 20:10:26 +0100 |
commit | 92261e48a33c3caf81e66ad413e79456eae5455b (patch) | |
tree | b45a5a788442b081a50565e4e91a9608c279ce21 | |
parent | 23f6ccf8d6b14ab2aa14b34230362000830c5f05 (diff) |
Add minimal preload buffer size (1024 samples).
-rw-r--r-- | src/drumkitloader.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc index 203db04..d5803d8 100644 --- a/src/drumkitloader.cc +++ b/src/drumkitloader.cc @@ -146,7 +146,12 @@ void DrumKitLoader::thread_main() AudioFile *audiofile = load_queue.front(); load_queue.pop_front(); filename = audiofile->filename; - audiofile->load(framesize * CHUNK_MULTIPLIER + framesize); + size_t preload_size = framesize * CHUNK_MULTIPLIER + framesize; + if(preload_size < 1024) + { + preload_size = 1024; + } + audiofile->load(preload_size); } loaded++; |