Update to latest Rack

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-12-01 16:27:19 +00:00
parent 877cf9418a
commit 4d1b470837
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
5 changed files with 21 additions and 11 deletions

View file

@ -333,7 +333,7 @@ public:
{
fWindowParameters[kWindowParameterShowTooltips] = 1.0f;
fWindowParameters[kWindowParameterCableOpacity] = 50.0f;
fWindowParameters[kWindowParameterCableTension] = 50.0f;
fWindowParameters[kWindowParameterCableTension] = 100.0f;
fWindowParameters[kWindowParameterRackBrightness] = 100.0f;
fWindowParameters[kWindowParameterHaloBrightness] = 25.0f;
fWindowParameters[kWindowParameterKnobMode] = 0.0f;
@ -609,7 +609,7 @@ protected:
parameter.symbol = "cableTension";
parameter.unit = "%";
parameter.hints = kParameterIsAutomatable;
parameter.ranges.def = 50.0f;
parameter.ranges.def = 100.0f;
parameter.ranges.min = 0.0f;
parameter.ranges.max = 100.0f;
break;

@ -1 +1 @@
Subproject commit 05fa24a72bccf4023f5fb1b0fa7f1c26855c0926
Subproject commit 6c81ba466f2207a443227cec509ae09993300137

View file

@ -143,13 +143,13 @@ struct Engine::Internal {
};
static void Engine_updateExpander(Engine* that, Module* module, bool side) {
static void Engine_updateExpander_NoLock(Engine* that, Module* module, bool side) {
Module::Expander& expander = side ? module->rightExpander : module->leftExpander;
Module* oldExpanderModule = expander.module;
if (expander.moduleId >= 0) {
if (!expander.module || expander.module->id != expander.moduleId) {
expander.module = that->getModule(expander.moduleId);
expander.module = that->getModule_NoLock(expander.moduleId);
}
}
else {
@ -368,8 +368,8 @@ void Engine::stepBlock(int frames) {
// Update expander pointers
for (Module* module : internal->modules) {
Engine_updateExpander(this, module, false);
Engine_updateExpander(this, module, true);
Engine_updateExpander_NoLock(this, module, false);
Engine_updateExpander_NoLock(this, module, true);
}
// Step individual frames
@ -538,6 +538,11 @@ void Engine::addModule(Module* module) {
// Dispatch AddEvent
Module::AddEvent eAdd;
module->onAdd(eAdd);
// Dispatch SampleRateChangeEvent
Module::SampleRateChangeEvent eSrc;
eSrc.sampleRate = internal->sampleRate;
eSrc.sampleTime = internal->sampleTime;
module->onSampleRateChange(eSrc);
// Update ParamHandles' module pointers
for (ParamHandle* paramHandle : internal->paramHandles) {
if (paramHandle->moduleId == module->id)
@ -679,6 +684,13 @@ void Engine::moduleFromJson(Module* module, json_t* rootJ) {
}
void Engine::prepareSaveModule(Module* module) {
ReadLock lock(internal->mutex);
Module::SaveEvent e;
module->onSave(e);
}
void Engine::prepareSave() {
ReadLock lock(internal->mutex);
for (Module* module : internal->modules) {