Skip to content

Commit

Permalink
added audio plugins module blank
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor authored and Igor committed Aug 8, 2024
1 parent 828165c commit 41f26e0
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 0 deletions.
1 change: 1 addition & 0 deletions SetupConfigure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ set(LINK_LIB
muse::workspace
workspacescene
muse::audio
muse::audioplugins
muse::mpe
muse::midi
muse::learn
Expand Down
7 changes: 7 additions & 0 deletions src/app/appfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -218,6 +222,9 @@ std::shared_ptr<muse::IApplication> 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());
Expand Down
4 changes: 4 additions & 0 deletions src/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
34 changes: 34 additions & 0 deletions src/framework/audioplugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.

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()
73 changes: 73 additions & 0 deletions src/framework/audioplugins/audiopluginsmodule.cpp
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
*/
#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<muse::diagnostics::IDiagnosticsPathsRegister>(moduleName());
// if (pr) {
// std::vector<io::path_t> 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();
// }
}

46 changes: 46 additions & 0 deletions src/framework/audioplugins/audiopluginsmodule.h
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
*/
#pragma once

#include <memory>

#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:

};
}


2 changes: 2 additions & 0 deletions src/framework/cmake/MuseDeclareOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/framework/cmake/MuseModules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set(MUSE_FRAMEWORK_MODULES
ACCESSIBILITY
ACTIONS
AUDIO
AUDIOPLUGINS
AUTOBOT
CLOUD
DIAGNOSTICS
Expand Down
2 changes: 2 additions & 0 deletions src/framework/cmake/muse_framework_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41f26e0

Please sign in to comment.