Tweak default wasm buffer size, allow to change it via menu

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-07-11 18:11:42 +01:00
parent e3a7a5ccb8
commit 63afbaacd8
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
4 changed files with 16 additions and 3 deletions

2
dpf

@ -1 +1 @@
Subproject commit e2e2b5507f683a6b62adbd984b62cdde0ed05c3d
Subproject commit 29e9fe9a9f449a92a5426066d8ac00a698050ee7

View file

@ -631,6 +631,19 @@ struct EngineButton : MenuButton {
requestMIDI();
}));
}
if (supportsBufferSizeChanges()) {
static const std::vector<uint32_t> bufferSizes = {256, 512, 1024, 2048, 4096, 8192, 16384};
const uint32_t currentBufferSize = getBufferSize();
menu->addChild(createSubmenuItem("Buffer Size", std::to_string(currentBufferSize), [=](ui::Menu* menu) {
for (uint32_t bufferSize : bufferSizes) {
menu->addChild(createCheckMenuItem(std::to_string(bufferSize), "",
[=]() {return currentBufferSize == bufferSize;},
[=]() {requestBufferSizeChange(bufferSize);}
));
}
}));
}
#endif
}
};

View file

@ -22,7 +22,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom;
[Components]
Name: resources; Description: "Resources"; Types: full custom; Flags: fixed;
Name: carla; Description: "Carla/Ildaeil host tools"; Types: full;
Name: jack; Description: "JACK Standalone"; Types: full;
Name: jack; Description: "Standalone (requires JACK)"; Types: full;
Name: lv2; Description: "LV2 plugin"; Types: full;
Name: vst2; Description: "VST2 plugin"; Types: full;
Name: vst3; Description: "VST3 plugin"; Types: full;

View file

@ -23,7 +23,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom;
[Components]
Name: resources; Description: "Resources"; Types: full custom; Flags: fixed;
Name: carla; Description: "Carla/Ildaeil host tools"; Types: full;
Name: jack; Description: "JACK Standalone"; Types: full;
Name: jack; Description: "Standalone (requires JACK)"; Types: full;
Name: lv2; Description: "LV2 plugin"; Types: full;
Name: vst2; Description: "VST2 plugin"; Types: full;
Name: vst3; Description: "VST3 plugin"; Types: full;