Tweak default wasm buffer size, allow to change it via menu
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
e3a7a5ccb8
commit
63afbaacd8
4 changed files with 16 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue