Skip to content

Commit

Permalink
Merge pull request #2017 from Wasted-Audio/feature/heavy-disable-simd
Browse files Browse the repository at this point in the history
add new nosimd property
  • Loading branch information
timothyschoen authored Jan 10, 2025
2 parents bfe1a4c + c01d4bd commit 8e431d1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/Heavy/DPFExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class DPFExporter final : public ExporterBase {
Value exportTypeValue = Value(var(1));
Value pluginTypeValue = Value(var(1));

Value disableSIMD = Value(var(0));

PropertiesPanelProperty* midiinProperty;
PropertiesPanelProperty* midioutProperty;

Expand Down Expand Up @@ -51,6 +53,10 @@ class DPFExporter final : public ExporterBase {
pluginFormats.add(new PropertiesPanel::BoolComponent("JACK", jackEnableValue, { "No", "Yes" }));
jackEnableValue.addListener(this);

PropertiesArray pro_properties;

pro_properties.add(new PropertiesPanel::BoolComponent("Disable SIMD", disableSIMD, { "No", "Yes" }));

for (auto* property : properties) {
property->setPreferredHeight(28);
}
Expand All @@ -64,6 +70,7 @@ class DPFExporter final : public ExporterBase {

panel.addSection("DPF", properties);
panel.addSection("Plugin formats", pluginFormats);
panel.addSection("Advanced", pro_properties);
}

ValueTree getState() override
Expand All @@ -83,6 +90,7 @@ class DPFExporter final : public ExporterBase {
stateTree.setProperty("jackEnableValue", getValue<int>(jackEnableValue), nullptr);
stateTree.setProperty("exportTypeValue", getValue<int>(exportTypeValue), nullptr);
stateTree.setProperty("pluginTypeValue", getValue<int>(pluginTypeValue), nullptr);
stateTree.setProperty("disableSIMD", getValue<int>(disableSIMD), nullptr);

return stateTree;
}
Expand All @@ -104,6 +112,7 @@ class DPFExporter final : public ExporterBase {
jackEnableValue = tree.getProperty("jackEnableValue");
exportTypeValue = tree.getProperty("exportTypeValue");
pluginTypeValue = tree.getProperty("pluginTypeValue");
disableSIMD = tree.getProperty("disableSIMD");
}

void valueChanged(Value& v) override
Expand Down Expand Up @@ -150,6 +159,8 @@ class DPFExporter final : public ExporterBase {
bool clap = getValue<int>(clapEnableValue);
bool jack = getValue<int>(jackEnableValue);

bool nosimd = getValue<int>(disableSIMD);

StringArray formats;

if (lv2) {
Expand Down Expand Up @@ -192,6 +203,7 @@ class DPFExporter final : public ExporterBase {
}

metaJson->setProperty("dpf", metaDPF);
metaJson->setProperty("nosimd", nosimd);

args.add("-m" + createMetaJson(metaJson));

Expand Down

0 comments on commit 8e431d1

Please sign in to comment.