Skip to content

Commit eaf1d21

Browse files
committed
add audio plugin
1 parent bbe0868 commit eaf1d21

File tree

13 files changed

+185
-2
lines changed

13 files changed

+185
-2
lines changed

libs/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ add_subdirectory(jetbrains-docking-system)
1010

1111
add_subdirectory(substate)
1212

13+
add_subdirectory(talcs)
14+
1315
set(CK_CMAKE_MODULES_DIR ${CMAKE_CURRENT_LIST_DIR}/choruskit/cmake PARENT_SCOPE)

scripts/vcpkg-manifest/vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"sdl2",
77
"libsndfile",
88
"libsamplerate",
9-
"boost-math",
9+
"boost-interprocess",
1010
"rpclib",
11+
"rtmidi",
1112
"interval-tree",
1213
"stdutau",
1314
"extensionsystem",

src/plugins/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ set(CURRENT_PLUGIN_DESC "DiffScope Application Plugin")
22

33
add_subdirectory(coreplugin)
44

5+
add_subdirectory(audioplugin)
6+
57
add_subdirectory(iemgr)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
project(audioplugin VERSION 0.1.0.0)
2+
3+
# Add target
4+
ck_add_plugin(${PROJECT_NAME}
5+
NAME Audio
6+
COMPAT_VERSION 0.0.0.0
7+
VENDOR "CrSjimo"
8+
DESCRIPTION "${CURRENT_PLUGIN_DESC}"
9+
MACRO_PREFIX AUDIO
10+
)
11+
12+
# Configure target
13+
file(GLOB_RECURSE _src *.h *.cpp)
14+
qm_configure_target(${PROJECT_NAME}
15+
SOURCES ${_src}
16+
QT_LINKS Core Gui Widgets
17+
QT_INCLUDE_PRIVATE Core Gui Widgets
18+
LINKS ChorusKit::AppCore svscraft::Widgets coreplugin talcs::Core talcs::Device talcs::Format talcs::Midi talcs::Remote
19+
INCLUDE_PRIVATE . internal
20+
)
21+
22+
# Add translation
23+
qm_import(Translate)
24+
qm_find_qt(LinguistTools)
25+
qm_add_translation(${PROJECT_NAME}_translations
26+
PREFIX Audio
27+
TARGETS ${PROJECT_NAME}
28+
LOCALES zh_CN zh_HK ja_JP
29+
TS_DIR res/translations
30+
QM_DIR ${CMAKE_CURRENT_BINARY_DIR}/res/translations
31+
TS_DEPENDS ChorusKit_UpdateTranslations
32+
QM_DEPENDS ChorusKit_ReleaseTranslations
33+
)
34+
35+
# Add resources
36+
ck_add_attached_files(${PROJECT_NAME}
37+
38+
# SRC Res/themes DEST .
39+
SRC ${CMAKE_CURRENT_BINARY_DIR}/Res/translations DEST .
40+
)
41+
42+
# Add install command
43+
ck_sync_include(${PROJECT_NAME}
44+
OPTIONS EXCLUDE "internal/.+"
45+
)
46+
47+
ck_sync_include(${PROJECT_NAME}
48+
DIRECTORY internal
49+
PREFIX "${PROJECT_NAME}/internal"
50+
SKIP_INSTALL
51+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef AUDIO_AUDIOGLOBAL_H
2+
#define AUDIO_AUDIOGLOBAL_H
3+
4+
#include <QtGlobal>
5+
6+
#if defined(AUDIO_LIBRARY)
7+
# define AUDIO_EXPORT Q_DECL_EXPORT
8+
#else
9+
# define AUDIO_EXPORT Q_DECL_IMPORT
10+
#endif
11+
12+
#endif // AUDIO_AUDIOGLOBAL_H

src/plugins/audioplugin/iaudio.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//
2+
// Created by Crs_1 on 2024/3/16.
3+
//
4+
5+
#include "iaudio.h"
6+
7+
namespace Audio {} // Audio

src/plugins/audioplugin/iaudio.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef AUDIO_IAUDIO_H
2+
#define AUDIO_IAUDIO_H
3+
4+
#include <audioglobal.h>
5+
6+
#include <QObject>
7+
8+
namespace Audio {
9+
10+
class AUDIO_EXPORT IAudio : public QObject {
11+
Q_OBJECT
12+
};
13+
14+
} // Audio
15+
16+
#endif // AUDIO_IAUDIO_H
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "audioplugin.h"
2+
3+
namespace Audio {
4+
5+
AudioPlugin::AudioPlugin() {
6+
}
7+
AudioPlugin::~AudioPlugin() = default;
8+
bool AudioPlugin::initialize(const QStringList &arguments, QString *errorString) {
9+
return true;
10+
}
11+
void AudioPlugin::extensionsInitialized() {
12+
}
13+
bool AudioPlugin::delayedInitialize() {
14+
return false;
15+
}
16+
QObject *AudioPlugin::remoteCommand(const QStringList &options, const QString &workingDirectory, const QStringList &args) {
17+
if (options.contains("-vst")) {
18+
19+
} else {
20+
21+
}
22+
return nullptr;
23+
}
24+
25+
} // Audio
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#ifndef AUDIO_AUDIOPLUGIN_H
2+
#define AUDIO_AUDIOPLUGIN_H
3+
4+
#include <extensionsystem/iplugin.h>
5+
6+
namespace Audio {
7+
8+
class AudioPlugin : public ExtensionSystem::IPlugin {
9+
Q_OBJECT
10+
Q_PLUGIN_METADATA(IID "org.OpenVPI.DiffScope.Plugin" FILE "plugin.json")
11+
public:
12+
AudioPlugin();
13+
~AudioPlugin() override;
14+
15+
bool initialize(const QStringList &arguments, QString *errorString) override;
16+
void extensionsInitialized() override;
17+
bool delayedInitialize() override;
18+
19+
QObject *remoteCommand(const QStringList &, const QString &, const QStringList &) override;
20+
};
21+
22+
} // Audio
23+
24+
#endif // AUDIO_AUDIOPLUGIN_H

0 commit comments

Comments
 (0)