summaryrefslogtreecommitdiff
path: root/src/drumkitloader.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-14 20:39:32 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-15 08:57:35 +0200
commit8b3506186e5c9c810bcbe4a4206874d9fd4dfe9b (patch)
treef27d5d1bcdd1f560de35f418bdf9333d32fff387 /src/drumkitloader.cc
parent87e0b9b288c0157544cfcefb63015a319507698a (diff)
Add chunk size control to the audio cache engine.
Diffstat (limited to 'src/drumkitloader.cc')
-rw-r--r--src/drumkitloader.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc
index 8ec47a5..e4d34f2 100644
--- a/src/drumkitloader.cc
+++ b/src/drumkitloader.cc
@@ -37,13 +37,15 @@
DrumKitLoader::DrumKitLoader(Settings& settings, DrumKit& kit,
AudioInputEngine& ie,
Resamplers& resamplers,
- Random& rand)
+ Random& rand,
+ AudioCache& audio_cache)
: settings(settings)
, getter(settings)
, kit(kit)
, ie(ie)
, resamplers(resamplers)
, rand(rand)
+ , audio_cache(audio_cache)
{
}
@@ -193,6 +195,8 @@ void DrumKitLoader::loadKit(DrumKit *kit)
DEBUG(loader, "Queued %d (size: %d) AudioFiles for loading.\n",
(int)settings.number_of_files.load(), (int)load_queue.size());
+ audio_cache.updateChunkSize(kit->channels.size());
+
semaphore.post(); // Start loader loop.
}