diff --git a/.github/actions/codeql/action.yml b/.github/actions/codeql/action.yml index 406885b69..33730ea45 100644 --- a/.github/actions/codeql/action.yml +++ b/.github/actions/codeql/action.yml @@ -69,7 +69,8 @@ runs: # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v3 - + env: + CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES: false # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun diff --git a/sources/effectengine/AnimationBaseMusic.cpp b/sources/effectengine/AnimationBaseMusic.cpp index 9674b06f4..5707cf66b 100644 --- a/sources/effectengine/AnimationBaseMusic.cpp +++ b/sources/effectengine/AnimationBaseMusic.cpp @@ -30,14 +30,14 @@ #include AnimationBaseMusic::AnimationBaseMusic(QString name) : - AnimationBase(name) + AnimationBase(name), + _soundCapture(nullptr), + _soundHandle(0) { _myTarget.Clear(); emit GlobalSignals::getInstance()->SignalGetSoundCapture(_soundCapture); - if (_soundCapture != nullptr) - SAFE_CALL_0_RET(_soundCapture.get(), open, uint32_t, _soundHandle) - else + if (_soundCapture == nullptr) setStopMe(true); }; @@ -49,6 +49,11 @@ AnimationBaseMusic::~AnimationBaseMusic() bool AnimationBaseMusic::isSoundEffect() { + if (_soundHandle == 0 && _soundCapture != nullptr) + { + SAFE_CALL_0_RET(_soundCapture.get(), open, uint32_t, _soundHandle) + } + return true; }; diff --git a/sources/effectengine/Effect.cpp b/sources/effectengine/Effect.cpp index 5d6968fd5..532d57d87 100644 --- a/sources/effectengine/Effect.cpp +++ b/sources/effectengine/Effect.cpp @@ -138,7 +138,7 @@ void Effect::start() _timer.setInterval(_effect->GetSleepTime()); - Info(_log, "Begin playing the effect with priority: %i", _priority); + Info(_log, "Begin playing the %s with priority: %i", (_effect->isSoundEffect()) ? "music effect" : "effect", _priority); run(); _timer.start();