Skip to content

Commit ede16f9

Browse files
committed
Update project structure
1 parent de0e8fa commit ede16f9

File tree

9 files changed

+46
-65
lines changed

9 files changed

+46
-65
lines changed

JDSP4Linux.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ TEMPLATE = subdirs
22

33
SUBDIRS += \
44
libjamesdsp \
5-
src/subprojects/EELEditor \
65
src
76

87
src.depends = libjamesdsp
9-
src.depends = src/subprojects/EELEditor

src/MainWindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ MainWindow::MainWindow(bool statupInTray,
151151
connect(_audioService, &IAudioService::convolverInfoChanged, this, &MainWindow::onConvolverInfoChanged);
152152

153153
// TODO
154-
// QTimer *timer = new QTimer(this);
155-
// connect(timer, SIGNAL(timeout()), _audioService, SLOT(enumerateLiveprogVariables()));
156-
// timer->start(200);
154+
QTimer *timer = new QTimer(this);
155+
connect(timer, SIGNAL(timeout()), _audioService, SLOT(enumerateLiveprogVariables()));
156+
timer->start(200);
157157

158158
connect(_eelEditor, &EELEditor::executionRequested, [this](QString path){
159159
if (QFileInfo::exists(path) && QFileInfo(path).isFile())

src/audio/base/IAudioService.h

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ class IAudioService : public QObject
2121

2222
public slots:
2323
virtual void update(DspConfig* config) = 0;
24-
virtual void reloadLiveprog() = 0;
24+
2525
virtual void reloadService() = 0;
2626

2727
virtual IAppManager* appManager() = 0;
28+
virtual DspHost* host() = 0;
2829

2930
virtual std::vector<IOutputDevice> sinkDevices() = 0;
3031
virtual DspStatus status() = 0;
3132

32-
virtual void enumerateLiveprogVariables() = 0;
33+
void reloadLiveprog();
34+
void enumerateLiveprogVariables();
3335

3436
void handleMessage(DspHost::Message msg, std::any arg);
3537

@@ -43,6 +45,29 @@ public slots:
4345

4446
};
4547

48+
inline void IAudioService::reloadLiveprog()
49+
{
50+
host()->reloadLiveprog();
51+
}
52+
53+
#include <iostream>
54+
inline void IAudioService::enumerateLiveprogVariables()
55+
{
56+
auto vars = this->host()->enumEelVariables();
57+
58+
for(const auto& var : vars)
59+
{
60+
if(std::holds_alternative<std::string>(var.value))
61+
std::cout << std::boolalpha << var.name << "\t\t" << std::get<std::string>(var.value) << "\t" << var.isString << std::endl;
62+
else
63+
std::cout << std::boolalpha << var.name << "\t\t" << std::get<float>(var.value) << "\t" << var.isString << std::endl;
64+
}
65+
66+
std::cout << "-------------------" << std::endl;
67+
68+
emit eelVariablesEnumerated(vars);
69+
}
70+
4671
inline void IAudioService::handleMessage(DspHost::Message msg, std::any value)
4772
{
4873
switch(msg)

src/audio/pipewire/PipewireAudioService.cpp

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,18 @@ void PipewireAudioService::update(DspConfig *config)
127127
plugin->host()->update(config);
128128
}
129129

130-
void PipewireAudioService::reloadLiveprog()
131-
{
132-
plugin->host()->reloadLiveprog();
133-
}
134-
135130
void PipewireAudioService::reloadService()
136131
{
137132
effects.get()->disconnect_filters();
138133
plugin->host()->updateFromCache();
139134
effects.get()->connect_filters();
140135
}
141136

137+
DspHost *PipewireAudioService::host()
138+
{
139+
return plugin->host();
140+
}
141+
142142
IAppManager *PipewireAudioService::appManager()
143143
{
144144
return appMgr.get();
@@ -168,25 +168,3 @@ DspStatus PipewireAudioService::status()
168168
return plugin->status();
169169
}
170170

171-
#include <iostream>
172-
173-
#include <config/AppConfig.h>
174-
void PipewireAudioService::enumerateLiveprogVariables()
175-
{
176-
177-
// TODO
178-
auto vars = plugin->host()->enumEelVariables();
179-
180-
for(const auto& var : vars)
181-
{
182-
if(std::holds_alternative<std::string>(var.value))
183-
std::cout << std::boolalpha << var.name << "\t\t" << std::get<std::string>(var.value) << "\t" << var.isString << std::endl;
184-
else
185-
std::cout << std::boolalpha << var.name << "\t\t" << std::get<float>(var.value) << "\t" << var.isString << std::endl;
186-
}
187-
188-
std::cout << "-------------------" << std::endl;
189-
190-
emit eelVariablesEnumerated(vars);
191-
}
192-

src/audio/pipewire/PipewireAudioService.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ public slots:
2626
void onAppConfigUpdated(const AppConfig::Key& key, const QVariant& value);
2727

2828
void update(DspConfig* config) override;
29-
void reloadLiveprog() override;
3029
void reloadService() override;
3130

31+
DspHost* host() override;
3232
IAppManager* appManager() override;
3333
std::vector<IOutputDevice> sinkDevices() override;
3434
DspStatus status() override;
3535

36-
void enumerateLiveprogVariables() override;
37-
3836
private:
3937
const std::string log_tag = "PipewireAudioService: ";
4038

src/audio/pulseaudio/PulseAudioService.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,17 @@ void PulseAudioService::update(DspConfig *config)
114114
mgr.get()->getDsp()->host()->update(config);
115115
}
116116

117-
void PulseAudioService::reloadLiveprog()
118-
{
119-
mgr.get()->getDsp()->host()->reloadLiveprog();
120-
}
121-
122117
void PulseAudioService::reloadService()
123118
{
124119
mgr.get()->relink();
125120
mgr.get()->getDsp()->host()->updateFromCache();
126121
}
127122

123+
DspHost *PulseAudioService::host()
124+
{
125+
return mgr.get()->getDsp()->host();
126+
}
127+
128128
IAppManager *PulseAudioService::appManager()
129129
{
130130
return appMgr;
@@ -145,9 +145,3 @@ DspStatus PulseAudioService::status()
145145
return mgr.get()->getDsp()->status();
146146
}
147147

148-
void PulseAudioService::enumerateLiveprogVariables()
149-
{
150-
auto vars = mgr.get()->getDsp()->host()->enumEelVariables();
151-
emit eelVariablesEnumerated(vars);
152-
}
153-

src/audio/pulseaudio/PulseAudioService.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ class PulseAudioService : public IAudioService
2222

2323
public slots:
2424
void update(DspConfig* config) override;
25-
void reloadLiveprog() override;
2625
void reloadService() override;
2726

27+
DspHost* host() override;
2828
IAppManager* appManager() override;
2929
std::vector<IOutputDevice> sinkDevices() override;
3030
DspStatus status() override;
3131

32-
void enumerateLiveprogVariables() override;
33-
3432
private:
3533
PulsePipelineManagerPtr mgr;
3634
PulseAppManager* appMgr;

src/src.pro

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ include(subprojects/FlatTabWidget/FlatTabWidget/FlatTabWidget.pri)
2525
include(subprojects/LiquidEqualizerWidget/LiquidEqualizerWidget.pri)
2626
include(subprojects/GraphicEQWidget/GraphicEQWidget/GraphicEQWidget.pri)
2727

28+
DEFINES += HAS_JDSP_DRIVER
29+
include(subprojects/EELEditor/src/EELEditor.pri)
30+
2831
# The following define makes your compiler emit warnings if you use
2932
# any feature of Qt which has been marked as deprecated (the exact warnings
3033
# depend on your compiler). Please consult the documentation of the
@@ -193,16 +196,3 @@ INCLUDEPATH += $$PWD/../libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/
193196
$$PWD/../libjamesdsp
194197
DEPENDPATH += $$PWD/../libjamesdsp
195198
unix:!macx: PRE_TARGETDEPS += $$OUT_PWD/../libjamesdsp/liblibjamesdsp.a
196-
197-
# Link libEELEditor
198-
unix:!macx: LIBS += -L$$OUT_PWD/subprojects/EELEditor/src -leeleditor
199-
INCLUDEPATH += $$PWD/subprojects/EELEditor/src \
200-
$$PWD/subprojects/EELEditor/3rdparty/QCodeEditor/include
201-
DEPENDPATH += $$PWD/subprojects/EELEditor/src
202-
unix:!macx: PRE_TARGETDEPS += $$OUT_PWD/subprojects/EELEditor/src/libeeleditor.a
203-
204-
# Link libqtadvanceddocking (libEELEditor)
205-
LIBS += -L$$OUT_PWD/subprojects/EELEditor/3rdparty/docking-system/lib
206-
include($$PWD/subprojects/EELEditor/3rdparty/docking-system/ads.pri)
207-
INCLUDEPATH += $$PWD/subprojects/EELEditor/3rdparty/docking-system/src
208-
DEPENDPATH += $$PWD/subprojects/EELEditor/3rdparty/docking-system/src

src/subprojects/EELEditor

0 commit comments

Comments
 (0)