From 92261e48a33c3caf81e66ad413e79456eae5455b Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 23 Jan 2016 20:10:26 +0100 Subject: Add minimal preload buffer size (1024 samples). --- src/drumkitloader.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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++; -- cgit v1.2.3