summaryrefslogtreecommitdiff
path: root/src/drumkitloader.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-04-08 00:15:32 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-04-08 00:15:32 +0200
commit057ef1d83ba263fb2adf1aa86f8e281ab0065c43 (patch)
tree31c1f237e3a9df9fc241d87527f7dd4245665d43 /src/drumkitloader.cc
parentb530ac02af61e320e137a392decef1b3cc5af2c4 (diff)
Refactoring to finally get rid of MessageHandler/Receiver in favor of the new Settings mechanism.
Diffstat (limited to 'src/drumkitloader.cc')
-rw-r--r--src/drumkitloader.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc
index 3cb4b68..f9e45db 100644
--- a/src/drumkitloader.cc
+++ b/src/drumkitloader.cc
@@ -184,18 +184,14 @@ void DrumKitLoader::thread_main()
audiofile->load(preload_size);
}
- loaded++;
+ ++loaded;
- if(loaded % fraction == 0 || loaded == total_num_audiofiles)
+ settings.number_of_files.store(total_num_audiofiles);
+ settings.number_of_files_loaded.store(loaded);
+
+ if(total_num_audiofiles == loaded)
{
- //LoadStatusMessage *ls = new LoadStatusMessage();
- //ls->number_of_files = total_num_audiofiles;
- //ls->numer_of_files_loaded = loaded;
- //ls->current_file = filename;
- //msghandler.sendMessage(MSGRCV_UI, ls);
- settings.number_of_files.store(total_num_audiofiles);
- settings.number_of_files_loaded.store(loaded);
- //settings.current_file.store(filename);
+ settings.drumkit_load_status.store(LoadStatus::Done);
}
}