Skip to content

Commit d4ba84c

Browse files
authored
Merge pull request #3111 from Digitalone1/master
Improve community presets management
2 parents cc61257 + 685050e commit d4ba84c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+710
-312
lines changed

data/schemas/com.github.wwmm.easyeffects.gschema.xml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@
1010
<key name="use-dark-theme" type="b">
1111
<default>false</default>
1212
</key>
13-
<key name="last-used-input-preset" type="s">
14-
<default l10n="messages">"Presets"</default>
13+
<key name="last-loaded-input-preset" type="s">
14+
<default>""</default>
1515
</key>
16-
<key name="last-used-output-preset" type="s">
17-
<default l10n="messages">"Presets"</default>
16+
<key name="last-loaded-output-preset" type="s">
17+
<default>""</default>
18+
</key>
19+
<key name="last-loaded-input-community-package" type="s">
20+
<default>""</default>
21+
</key>
22+
<key name="last-loaded-output-community-package" type="s">
23+
<default>""</default>
1824
</key>
1925
<key name="window-maximized" type="b">
2026
<default>false</default>
@@ -62,4 +68,4 @@
6268
<default>false</default>
6369
</key>
6470
</schema>
65-
</schemalist>
71+
</schemalist>

data/ui/plugins_box.ui

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<property name="halign">center</property>
1414
<property name="valign">center</property>
1515
<property name="margin-top">6</property>
16+
<property name="margin-start">12</property>
17+
<property name="margin-end">12</property>
1618
<property name="spacing">6</property>
1719
<child>
1820
<object class="GtkToggleButton" id="toggle_plugins_list">

data/ui/presets_menu.ui

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,30 @@
154154
</child>
155155

156156
<child>
157-
<object class="GtkLabel" id="last_used_name">
157+
<object class="GtkBox">
158158
<property name="halign">center</property>
159-
<property name="valign">end</property>
160-
<style>
161-
<class name="dim-label" />
162-
</style>
159+
<property name="valign">center</property>
160+
<property name="orientation">vertical</property>
161+
<property name="spacing">6</property>
162+
163+
<child>
164+
<object class="GtkLabel" id="last_loaded_preset_title">
165+
<property name="halign">center</property>
166+
<property name="valign">center</property>
167+
</object>
168+
</child>
169+
170+
<child>
171+
<object class="GtkLabel" id="last_loaded_preset_value">
172+
<property name="halign">center</property>
173+
<property name="valign">center</property>
174+
<property name="wrap">1</property>
175+
<property name="wrap-mode">word</property>
176+
<style>
177+
<class name="dim-label" />
178+
</style>
179+
</object>
180+
</child>
163181
</object>
164182
</child>
165183
</object>

include/autogain.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class AutoGain : public PluginBase {
3434
AutoGain(const std::string& tag,
3535
const std::string& schema,
3636
const std::string& schema_path,
37-
PipeManager* pipe_manager);
37+
PipeManager* pipe_manager,
38+
PipelineType pipe_type);
3839
AutoGain(const AutoGain&) = delete;
3940
auto operator=(const AutoGain&) -> AutoGain& = delete;
4041
AutoGain(const AutoGain&&) = delete;

include/bass_enhancer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class BassEnhancer : public PluginBase {
3030
BassEnhancer(const std::string& tag,
3131
const std::string& schema,
3232
const std::string& schema_path,
33-
PipeManager* pipe_manager);
33+
PipeManager* pipe_manager,
34+
PipelineType pipe_type);
3435
BassEnhancer(const BassEnhancer&) = delete;
3536
auto operator=(const BassEnhancer&) -> BassEnhancer& = delete;
3637
BassEnhancer(const BassEnhancer&&) = delete;

include/bass_loudness.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class BassLoudness : public PluginBase {
2929
BassLoudness(const std::string& tag,
3030
const std::string& schema,
3131
const std::string& schema_path,
32-
PipeManager* pipe_manager);
32+
PipeManager* pipe_manager,
33+
PipelineType pipe_type);
3334
BassLoudness(const BassLoudness&) = delete;
3435
auto operator=(const BassLoudness&) -> BassLoudness& = delete;
3536
BassLoudness(const BassLoudness&&) = delete;

include/compressor.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class Compressor : public PluginBase {
3333
Compressor(const std::string& tag,
3434
const std::string& schema,
3535
const std::string& schema_path,
36-
PipeManager* pipe_manager);
36+
PipeManager* pipe_manager,
37+
PipelineType pipe_type);
3738
Compressor(const Compressor&) = delete;
3839
auto operator=(const Compressor&) -> Compressor& = delete;
3940
Compressor(const Compressor&&) = delete;

include/convolver.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class Convolver : public PluginBase {
3535
Convolver(const std::string& tag,
3636
const std::string& schema,
3737
const std::string& schema_path,
38-
PipeManager* pipe_manager);
38+
PipeManager* pipe_manager,
39+
PipelineType pipe_type);
3940
Convolver(const Convolver&) = delete;
4041
auto operator=(const Convolver&) -> Convolver& = delete;
4142
Convolver(const Convolver&&) = delete;

include/convolver_menu_impulses.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ G_END_DECLS
3939

4040
auto create() -> ConvolverMenuImpulses*;
4141

42-
void setup(ConvolverMenuImpulses* self, const std::string& schema_path, app::Application* application);
42+
void setup(ConvolverMenuImpulses* self,
43+
const std::string& schema_path,
44+
app::Application* application,
45+
std::shared_ptr<Convolver> convolver);
4346

4447
void append_to_string_list(ConvolverMenuImpulses* self, const std::string& irs_filename);
4548

include/crossfeed.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class Crossfeed : public PluginBase {
3131
Crossfeed(const std::string& tag,
3232
const std::string& schema,
3333
const std::string& schema_path,
34-
PipeManager* pipe_manager);
34+
PipeManager* pipe_manager,
35+
PipelineType pipe_type);
3536
Crossfeed(const Crossfeed&) = delete;
3637
auto operator=(const Crossfeed&) -> Crossfeed& = delete;
3738
Crossfeed(const Crossfeed&&) = delete;

include/crystalizer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class Crystalizer : public PluginBase {
3636
Crystalizer(const std::string& tag,
3737
const std::string& schema,
3838
const std::string& schema_path,
39-
PipeManager* pipe_manager);
39+
PipeManager* pipe_manager,
40+
PipelineType pipe_type);
4041
Crystalizer(const Crystalizer&) = delete;
4142
auto operator=(const Crystalizer&) -> Crystalizer& = delete;
4243
Crystalizer(const Crystalizer&&) = delete;

include/deepfilternet.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class DeepFilterNet : public PluginBase {
3333
DeepFilterNet(const std::string& tag,
3434
const std::string& schema,
3535
const std::string& schema_path,
36-
PipeManager* pipe_manager);
36+
PipeManager* pipe_manager,
37+
PipelineType pipe_type);
3738
DeepFilterNet(const DeepFilterNet&) = delete;
3839
auto operator=(const DeepFilterNet&) -> DeepFilterNet& = delete;
3940
DeepFilterNet(const DeepFilterNet&&) = delete;

include/deesser.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727

2828
class Deesser : public PluginBase {
2929
public:
30-
Deesser(const std::string& tag, const std::string& schema, const std::string& schema_path, PipeManager* pipe_manager);
30+
Deesser(const std::string& tag,
31+
const std::string& schema,
32+
const std::string& schema_path,
33+
PipeManager* pipe_manager,
34+
PipelineType pipe_type);
3135
Deesser(const Deesser&) = delete;
3236
auto operator=(const Deesser&) -> Deesser& = delete;
3337
Deesser(const Deesser&&) = delete;

include/delay.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727

2828
class Delay : public PluginBase {
2929
public:
30-
Delay(const std::string& tag, const std::string& schema, const std::string& schema_path, PipeManager* pipe_manager);
30+
Delay(const std::string& tag,
31+
const std::string& schema,
32+
const std::string& schema_path,
33+
PipeManager* pipe_manager,
34+
PipelineType pipe_type);
3135
Delay(const Delay&) = delete;
3236
auto operator=(const Delay&) -> Delay& = delete;
3337
Delay(const Delay&&) = delete;

include/echo_canceller.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class EchoCanceller : public PluginBase {
3636
EchoCanceller(const std::string& tag,
3737
const std::string& schema,
3838
const std::string& schema_path,
39-
PipeManager* pipe_manager);
39+
PipeManager* pipe_manager,
40+
PipelineType pipe_type);
4041
EchoCanceller(const EchoCanceller&) = delete;
4142
auto operator=(const EchoCanceller&) -> EchoCanceller& = delete;
4243
EchoCanceller(const EchoCanceller&&) = delete;

include/effects_base.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
class EffectsBase {
6363
public:
64-
EffectsBase(std::string tag, const std::string& schema, PipeManager* pipe_manager);
64+
EffectsBase(std::string tag, const std::string& schema, PipeManager* pipe_manager, PipelineType pipe_type);
6565
EffectsBase(const EffectsBase&) = delete;
6666
auto operator=(const EffectsBase&) -> EffectsBase& = delete;
6767
EffectsBase(const EffectsBase&&) = delete;
@@ -72,6 +72,8 @@ class EffectsBase {
7272

7373
PipeManager* pm = nullptr;
7474

75+
PipelineType pipeline_type;
76+
7577
std::shared_ptr<OutputLevel> output_level;
7678
std::shared_ptr<Spectrum> spectrum;
7779

include/equalizer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class Equalizer : public PluginBase {
3939
const std::string& schema_channel,
4040
const std::string& schema_channel_left_path,
4141
const std::string& schema_channel_right_path,
42-
PipeManager* pipe_manager);
42+
PipeManager* pipe_manager,
43+
PipelineType pipe_type);
4344
Equalizer(const Equalizer&) = delete;
4445
auto operator=(const Equalizer&) -> Equalizer& = delete;
4546
Equalizer(const Equalizer&&) = delete;

include/exciter.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727

2828
class Exciter : public PluginBase {
2929
public:
30-
Exciter(const std::string& tag, const std::string& schema, const std::string& schema_path, PipeManager* pipe_manager);
30+
Exciter(const std::string& tag,
31+
const std::string& schema,
32+
const std::string& schema_path,
33+
PipeManager* pipe_manager,
34+
PipelineType pipe_type);
3135
Exciter(const Exciter&) = delete;
3236
auto operator=(const Exciter&) -> Exciter& = delete;
3337
Exciter(const Exciter&&) = delete;

include/expander.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class Expander : public PluginBase {
3333
Expander(const std::string& tag,
3434
const std::string& schema,
3535
const std::string& schema_path,
36-
PipeManager* pipe_manager);
36+
PipeManager* pipe_manager,
37+
PipelineType pipe_type);
3738
Expander(const Expander&) = delete;
3839
auto operator=(const Expander&) -> Expander& = delete;
3940
Expander(const Expander&&) = delete;

include/filter.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626

2727
class Filter : public PluginBase {
2828
public:
29-
Filter(const std::string& tag, const std::string& schema, const std::string& schema_path, PipeManager* pipe_manager);
29+
Filter(const std::string& tag,
30+
const std::string& schema,
31+
const std::string& schema_path,
32+
PipeManager* pipe_manager,
33+
PipelineType pipe_type);
3034
Filter(const Filter&) = delete;
3135
auto operator=(const Filter&) -> Filter& = delete;
3236
Filter(const Filter&&) = delete;

include/gate.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030

3131
class Gate : public PluginBase {
3232
public:
33-
Gate(const std::string& tag, const std::string& schema, const std::string& schema_path, PipeManager* pipe_manager);
33+
Gate(const std::string& tag,
34+
const std::string& schema,
35+
const std::string& schema_path,
36+
PipeManager* pipe_manager,
37+
PipelineType pipe_type);
3438
Gate(const Gate&) = delete;
3539
auto operator=(const Gate&) -> Gate& = delete;
3640
Gate(const Gate&&) = delete;

include/level_meter.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class LevelMeter : public PluginBase {
3434
LevelMeter(const std::string& tag,
3535
const std::string& schema,
3636
const std::string& schema_path,
37-
PipeManager* pipe_manager);
37+
PipeManager* pipe_manager,
38+
PipelineType pipe_type);
3839
LevelMeter(const LevelMeter&) = delete;
3940
auto operator=(const LevelMeter&) -> LevelMeter& = delete;
4041
LevelMeter(const LevelMeter&&) = delete;

include/limiter.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030

3131
class Limiter : public PluginBase {
3232
public:
33-
Limiter(const std::string& tag, const std::string& schema, const std::string& schema_path, PipeManager* pipe_manager);
33+
Limiter(const std::string& tag,
34+
const std::string& schema,
35+
const std::string& schema_path,
36+
PipeManager* pipe_manager,
37+
PipelineType pipe_type);
3438
Limiter(const Limiter&) = delete;
3539
auto operator=(const Limiter&) -> Limiter& = delete;
3640
Limiter(const Limiter&&) = delete;

include/loudness.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class Loudness : public PluginBase {
3030
Loudness(const std::string& tag,
3131
const std::string& schema,
3232
const std::string& schema_path,
33-
PipeManager* pipe_manager);
33+
PipeManager* pipe_manager,
34+
PipelineType pipe_type);
3435
Loudness(const Loudness&) = delete;
3536
auto operator=(const Loudness&) -> Loudness& = delete;
3637
Loudness(const Loudness&&) = delete;

include/maximizer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class Maximizer : public PluginBase {
3131
Maximizer(const std::string& tag,
3232
const std::string& schema,
3333
const std::string& schema_path,
34-
PipeManager* pipe_manager);
34+
PipeManager* pipe_manager,
35+
PipelineType pipe_type);
3536
Maximizer(const Maximizer&) = delete;
3637
auto operator=(const Maximizer&) -> Maximizer& = delete;
3738
Maximizer(const Maximizer&&) = delete;

include/multiband_compressor.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class MultibandCompressor : public PluginBase {
4040
MultibandCompressor(const std::string& tag,
4141
const std::string& schema,
4242
const std::string& schema_path,
43-
PipeManager* pipe_manager);
43+
PipeManager* pipe_manager,
44+
PipelineType pipe_type);
4445
MultibandCompressor(const MultibandCompressor&) = delete;
4546
auto operator=(const MultibandCompressor&) -> MultibandCompressor& = delete;
4647
MultibandCompressor(const MultibandCompressor&&) = delete;

include/multiband_gate.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class MultibandGate : public PluginBase {
4040
MultibandGate(const std::string& tag,
4141
const std::string& schema,
4242
const std::string& schema_path,
43-
PipeManager* pipe_manager);
43+
PipeManager* pipe_manager,
44+
PipelineType pipe_type);
4445
MultibandGate(const MultibandGate&) = delete;
4546
auto operator=(const MultibandGate&) -> MultibandGate& = delete;
4647
MultibandGate(const MultibandGate&&) = delete;

include/output_level.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class OutputLevel : public PluginBase {
2929
OutputLevel(const std::string& tag,
3030
const std::string& schema,
3131
const std::string& schema_path,
32-
PipeManager* pipe_manager);
32+
PipeManager* pipe_manager,
33+
PipelineType pipe_type);
3334
OutputLevel(const OutputLevel&) = delete;
3435
auto operator=(const OutputLevel&) -> OutputLevel& = delete;
3536
OutputLevel(const OutputLevel&&) = delete;

include/pitch.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030

3131
class Pitch : public PluginBase {
3232
public:
33-
Pitch(const std::string& tag, const std::string& schema, const std::string& schema_path, PipeManager* pipe_manager);
33+
Pitch(const std::string& tag,
34+
const std::string& schema,
35+
const std::string& schema_path,
36+
PipeManager* pipe_manager,
37+
PipelineType pipe_type);
3438
Pitch(const Pitch&) = delete;
3539
auto operator=(const Pitch&) -> Pitch& = delete;
3640
Pitch(const Pitch&&) = delete;

include/plugin_base.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <vector>
3434
#include "lv2_wrapper.hpp"
3535
#include "pipe_manager.hpp"
36+
#include "pipeline_type.hpp"
3637
#include "util.hpp"
3738

3839
class PluginBase {
@@ -43,6 +44,7 @@ class PluginBase {
4344
const std::string& schema,
4445
const std::string& schema_path,
4546
PipeManager* pipe_manager,
47+
PipelineType pipe_type,
4648
const bool& enable_probe = false);
4749
PluginBase(const PluginBase&) = delete;
4850
auto operator=(const PluginBase&) -> PluginBase& = delete;
@@ -73,6 +75,8 @@ class PluginBase {
7375

7476
std::string name, package;
7577

78+
PipelineType pipeline_type{};
79+
7680
pw_filter* filter = nullptr;
7781

7882
pw_filter_state state = PW_FILTER_STATE_UNCONNECTED;
@@ -146,7 +150,7 @@ class PluginBase {
146150
protected:
147151
std::mutex data_mutex;
148152

149-
GSettings* settings = nullptr;
153+
GSettings *settings = nullptr, *global_settings = nullptr;
150154

151155
PipeManager* pm = nullptr;
152156

0 commit comments

Comments
 (0)