diff --git a/euphonium/src/plugins/cspot/CSpotPlugin.cpp b/euphonium/src/plugins/cspot/CSpotPlugin.cpp index 29507534..35804e26 100644 --- a/euphonium/src/plugins/cspot/CSpotPlugin.cpp +++ b/euphonium/src/plugins/cspot/CSpotPlugin.cpp @@ -83,6 +83,11 @@ void CSpotPlugin::runTask() { mercuryManager->startTask(); auto audioSink = std::make_shared(this->audioBuffer, this->luaEventBus); + + while (!mercuryManager->isRunning) { + BELL_SLEEP_MS(10); + } + spircController = std::make_shared( mercuryManager, authBlob->username, audioSink); diff --git a/targets/cli/FileScriptLoader.cpp b/targets/cli/FileScriptLoader.cpp index a02a5114..3a8c1ee6 100644 --- a/targets/cli/FileScriptLoader.cpp +++ b/targets/cli/FileScriptLoader.cpp @@ -1,6 +1,12 @@ #include +#include FileScriptLoader::FileScriptLoader() { + struct stat st; + if (stat("../../../euphonium/scripts/configuration", &st) != 0 || !S_ISDIR(st.st_mode)) + { + mkdir("../../../euphonium/scripts/configuration", 0755); + } } void FileScriptLoader::loadScript(std::string scriptName, std::shared_ptr berry) {