From dc48beae1b17fbb462175fdcbe3e3d3fedd6a0fc Mon Sep 17 00:00:00 2001 From: Igor Date: Thu, 8 Aug 2024 14:50:49 +0200 Subject: [PATCH] added audio plugins module blank --- SetupConfigure.cmake | 1 + src/app/CMakeLists.txt | 1 + src/app/appfactory.cpp | 7 ++ src/framework/CMakeLists.txt | 4 + src/framework/audioplugins/CMakeLists.txt | 34 +++++++++ .../audioplugins/audiopluginsmodule.cpp | 73 +++++++++++++++++++ .../audioplugins/audiopluginsmodule.h | 46 ++++++++++++ src/framework/cmake/MuseDeclareOptions.cmake | 2 + src/framework/cmake/MuseModules.cmake | 1 + .../cmake/muse_framework_config.h.in | 2 + 10 files changed, 171 insertions(+) create mode 100644 src/framework/audioplugins/CMakeLists.txt create mode 100644 src/framework/audioplugins/audiopluginsmodule.cpp create mode 100644 src/framework/audioplugins/audiopluginsmodule.h diff --git a/SetupConfigure.cmake b/SetupConfigure.cmake index a8d42b5bdbfed..25cbdbda6ecc5 100644 --- a/SetupConfigure.cmake +++ b/SetupConfigure.cmake @@ -126,6 +126,7 @@ if(BUILD_CONFIGURE MATCHES "VTEST") set(MUSE_MODULE_ACCESSIBILITY OFF) set(MUSE_MODULE_AUDIO OFF) + set(MUSE_MODULE_AUDIOPLUGINS OFF) set(MUE_BUILD_BRAILLE_MODULE OFF) set(MUSE_MODULE_MIDI OFF) set(MUSE_MODULE_MPE OFF) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 81fa52987c8ce..14a38f7cfa7ce 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -140,6 +140,7 @@ set(LINK_LIB muse::workspace workspacescene muse::audio + muse::audioplugins muse::mpe muse::midi muse::learn diff --git a/src/app/appfactory.cpp b/src/app/appfactory.cpp index 3a623667278fb..6aa98ec20aeb7 100644 --- a/src/app/appfactory.cpp +++ b/src/app/appfactory.cpp @@ -19,6 +19,10 @@ #include "framework/stubs/audio/audiostubmodule.h" #endif +#ifdef MUSE_MODULE_AUDIOPLUGINS +#include "framework/audioplugins/audiopluginsmodule.h" +#endif + #ifdef MUSE_MODULE_CLOUD #include "framework/cloud/cloudmodule.h" #else @@ -218,6 +222,9 @@ std::shared_ptr AppFactory::newGuiApp(const CmdOptions& opti app->addModule(new muse::accessibility::AccessibilityModule()); app->addModule(new muse::actions::ActionsModule()); app->addModule(new muse::audio::AudioModule()); +#ifdef MUSE_MODULE_AUDIOPLUGINS + app->addModule(new muse::audioplugins::AudioPluginsModule()); +#endif app->addModule(new muse::draw::DrawModule()); app->addModule(new muse::midi::MidiModule()); app->addModule(new muse::mpe::MpeModule()); diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt index a3d4fb8635296..38d4981d66e97 100644 --- a/src/framework/CMakeLists.txt +++ b/src/framework/CMakeLists.txt @@ -35,6 +35,10 @@ if (MUSE_MODULE_AUDIO) add_subdirectory(audio) endif() +if (MUSE_MODULE_AUDIOPLUGINS) + add_subdirectory(audioplugins) +endif() + if (MUSE_MODULE_AUTOBOT) add_subdirectory(autobot) endif() diff --git a/src/framework/audioplugins/CMakeLists.txt b/src/framework/audioplugins/CMakeLists.txt new file mode 100644 index 0000000000000..9b36097fd92f4 --- /dev/null +++ b/src/framework/audioplugins/CMakeLists.txt @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: GPL-3.0-only +# MuseScore-CLA-applies +# +# MuseScore +# Music Composition & Notation +# +# Copyright (C) 2021 MuseScore BVBA and others +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +declare_module(muse_audioplugins) +set(MODULE_ALIAS muse::audioplugins) + +set(MODULE_SRC + + ${CMAKE_CURRENT_LIST_DIR}/audiopluginsmodule.cpp + ${CMAKE_CURRENT_LIST_DIR}/audiopluginsmodule.h +) + +setup_module() + +if (MUSE_MODULE_AUDIOPLUGINS_TESTS) + #add_subdirectory(tests) +endif() diff --git a/src/framework/audioplugins/audiopluginsmodule.cpp b/src/framework/audioplugins/audiopluginsmodule.cpp new file mode 100644 index 0000000000000..b9a570c88d731 --- /dev/null +++ b/src/framework/audioplugins/audiopluginsmodule.cpp @@ -0,0 +1,73 @@ +/* + * SPDX-License-Identifier: GPL-3.0-only + * MuseScore-CLA-applies + * + * MuseScore + * Music Composition & Notation + * + * Copyright (C) 2021 MuseScore BVBA and others + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "audiopluginsmodule.h" + + +#include "log.h" + +using namespace muse; +using namespace muse::modularity; +using namespace muse::audioplugins; + +AudioPluginsModule::AudioPluginsModule() +{ + +} + +std::string AudioPluginsModule::moduleName() const +{ + return "audioplugins"; +} + +void AudioPluginsModule::registerExports() +{ + +} + +void AudioPluginsModule::resolveImports() +{ + +} + +void AudioPluginsModule::onInit(const IApplication::RunMode& mode) +{ + + + //! --- Diagnostics --- + // auto pr = ioc()->resolve(moduleName()); + // if (pr) { + // std::vector paths = m_configuration->soundFontDirectories(); + // for (const io::path_t& p : paths) { + // pr->reg("soundfonts", p); + // } + // pr->reg("known_audio_plugins", m_configuration->knownAudioPluginsFilePath()); + // } +} + +void AudioPluginsModule::onDelayedInit() +{ + // Ret ret = m_registerAudioPluginsScenario->registerNewPlugins(); + // if (!ret) { + // LOGE() << ret.toString(); + // } +} + diff --git a/src/framework/audioplugins/audiopluginsmodule.h b/src/framework/audioplugins/audiopluginsmodule.h new file mode 100644 index 0000000000000..039c37a4b3bfa --- /dev/null +++ b/src/framework/audioplugins/audiopluginsmodule.h @@ -0,0 +1,46 @@ +/* + * SPDX-License-Identifier: GPL-3.0-only + * MuseScore-CLA-applies + * + * MuseScore + * Music Composition & Notation + * + * Copyright (C) 2021 MuseScore BVBA and others + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include + +#include "modularity/imodulesetup.h" + +namespace muse::audioplugins { +class AudioPluginsModule : public modularity::IModuleSetup +{ +public: + AudioPluginsModule(); + + std::string moduleName() const override; + + void registerExports() override; + void resolveImports() override; + void onInit(const IApplication::RunMode& mode) override; + void onDelayedInit() override; + +private: + +}; +} + + diff --git a/src/framework/cmake/MuseDeclareOptions.cmake b/src/framework/cmake/MuseDeclareOptions.cmake index 8b24f168ec574..af18b574f2172 100644 --- a/src/framework/cmake/MuseDeclareOptions.cmake +++ b/src/framework/cmake/MuseDeclareOptions.cmake @@ -14,6 +14,8 @@ declare_muse_module_opt(AUDIO ON) option(MUSE_MODULE_AUDIO_JACK "Enable jack support" OFF) option(MUSE_MODULE_AUDIO_EXPORT "Enable audio export" ON) +declare_muse_module_opt(AUDIOPLUGINS ON) + declare_muse_module_opt(AUTOBOT ON) declare_muse_module_opt(CLOUD ON) option(MUSE_MODULE_CLOUD_MUSESCORECOM "Enable MuseScore.com account" ON) diff --git a/src/framework/cmake/MuseModules.cmake b/src/framework/cmake/MuseModules.cmake index 1f02675d1d2e1..2654aa0fb330d 100644 --- a/src/framework/cmake/MuseModules.cmake +++ b/src/framework/cmake/MuseModules.cmake @@ -3,6 +3,7 @@ set(MUSE_FRAMEWORK_MODULES ACCESSIBILITY ACTIONS AUDIO + AUDIOPLUGINS AUTOBOT CLOUD DIAGNOSTICS diff --git a/src/framework/cmake/muse_framework_config.h.in b/src/framework/cmake/muse_framework_config.h.in index 66f8f3a071a31..a80144155e8fa 100644 --- a/src/framework/cmake/muse_framework_config.h.in +++ b/src/framework/cmake/muse_framework_config.h.in @@ -34,6 +34,8 @@ #cmakedefine MUSE_MODULE_AUDIO_JACK 1 #cmakedefine MUSE_MODULE_AUDIO_EXPORT 1 +#cmakedefine MUSE_MODULE_AUDIOPLUGINS 1 + #cmakedefine MUSE_MODULE_AUTOBOT 1 #cmakedefine MUSE_MODULE_AUTOBOT_TESTS 1 #cmakedefine MUSE_MODULE_AUTOBOT_API 1