summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-04-22 18:18:53 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-04-22 18:45:49 +0200
commit28096a402947b05c7e923e075f926263a3279a42 (patch)
tree0dd68b8ab1f84e6fb5ec246ad0d456eb30ff5fd3 /src
parentfcfaa7affa0ac8afeaf38346226beb30fca09733 (diff)
Fix crash when doing async-load in cli.
Diffstat (limited to 'src')
-rw-r--r--src/drumkitloader.cc5
-rw-r--r--src/settings.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc
index 6a4c9f4..9167201 100644
--- a/src/drumkitloader.cc
+++ b/src/drumkitloader.cc
@@ -138,7 +138,7 @@ bool DrumKitLoader::loadkit(const std::string& file)
settings.drumkit_samplerate.store(44100);
settings.load_status_text.store("");
- settings.drumkit_load_status.store(LoadStatus::Loading);
+ settings.drumkit_load_status.store(LoadStatus::Parsing);
// Parse drumkit and instrument xml
@@ -226,6 +226,9 @@ bool DrumKitLoader::loadkit(const std::string& file)
settings.midimap_file = drumkit_path + "/" + drumkitdom.metadata.default_midimap_file;
}
+ // Done parsing. Now start loading the audio
+ settings.midimap_load_status.store(LoadStatus::Loading);
+
loadKitAudio(kit);
DEBUG(loadkit, "loadkit: Success\n");
diff --git a/src/settings.h b/src/settings.h
index 7507827..fb93d79 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -38,6 +38,7 @@
enum class LoadStatus : unsigned int
{
Idle,
+ Parsing,
Loading,
Done,
Error