Don't abort if the state-load invalidates something
This commit is contained in:
parent
124fd4592a
commit
51700553b0
@ -421,7 +421,6 @@ struct Plugin : public clap_plugin {
|
|||||||
},
|
},
|
||||||
.param_id=param.id,
|
.param_id=param.id,
|
||||||
};
|
};
|
||||||
LOG_EXPR(event.header.type);
|
|
||||||
// Not *super* bothered if this fails
|
// Not *super* bothered if this fails
|
||||||
events->try_push(events, &event.header);
|
events->try_push(events, &event.header);
|
||||||
};
|
};
|
||||||
@ -444,7 +443,6 @@ struct Plugin : public clap_plugin {
|
|||||||
.channel=-1,
|
.channel=-1,
|
||||||
.key=-1
|
.key=-1
|
||||||
};
|
};
|
||||||
LOG_EXPR(event.header.type);
|
|
||||||
if (param.rangeParam) {
|
if (param.rangeParam) {
|
||||||
event.value = param.rangeInfo->toUnit((double)*param.rangeParam);
|
event.value = param.rangeInfo->toUnit((double)*param.rangeParam);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -38,7 +38,7 @@ struct STFXStorageScanner : public signalsmith::storage::StorageScanner<SubClass
|
|||||||
template<class SubClassCRTP=void>
|
template<class SubClassCRTP=void>
|
||||||
struct STFXStorageWriter : public signalsmith::storage::StorageCborWriter<SubClassCRTP> {
|
struct STFXStorageWriter : public signalsmith::storage::StorageCborWriter<SubClassCRTP> {
|
||||||
using signalsmith::storage::StorageCborWriter<SubClassCRTP>::StorageCborWriter;
|
using signalsmith::storage::StorageCborWriter<SubClassCRTP>::StorageCborWriter;
|
||||||
|
|
||||||
void info(const char *name, const char *desc) {
|
void info(const char *name, const char *desc) {
|
||||||
sub().extra("name", name);
|
sub().extra("name", name);
|
||||||
sub().extra("desc", desc);
|
sub().extra("desc", desc);
|
||||||
@ -103,7 +103,6 @@ struct STFXStorageReader : public signalsmith::storage::StorageCborReader<SubCla
|
|||||||
}
|
}
|
||||||
void invalidate(const char *invalidatedKey) {
|
void invalidate(const char *invalidatedKey) {
|
||||||
LOG_EXPR(invalidatedKey);
|
LOG_EXPR(invalidatedKey);
|
||||||
abort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class PR>
|
template<class PR>
|
||||||
|
|||||||
@ -56,7 +56,8 @@ struct WebStateReader : public storage::STFXStorageReader<WebStateReader> {
|
|||||||
void extra(const char *key, V v) {}
|
void extra(const char *key, V v) {}
|
||||||
|
|
||||||
void invalidate(const char *invalidatedKey) {
|
void invalidate(const char *invalidatedKey) {
|
||||||
LOG_EXPR(invalidatedKey);
|
// TODO: right now this is hacked together, by the params re-sending themselves whenever they would otherwise invalidate.
|
||||||
|
// Instead, this would let us reply with only the keys which changed
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -184,7 +185,7 @@ struct WebUIHelper {
|
|||||||
if (effect->paramListenerRange) {
|
if (effect->paramListenerRange) {
|
||||||
effect->paramListenerRange(context, *this);
|
effect->paramListenerRange(context, *this);
|
||||||
}
|
}
|
||||||
effect->requestEntireState(); // TODO: shouldn't be necessary once we have `.invalidate()` working
|
sendUpdateMessage(); // TODO: shouldn't be necessary once we have `.invalidate()` working
|
||||||
} else {
|
} else {
|
||||||
sendUpdateMessage();
|
sendUpdateMessage();
|
||||||
}
|
}
|
||||||
@ -249,7 +250,7 @@ struct WebUIHelper {
|
|||||||
if (effect->paramListenerStepped) {
|
if (effect->paramListenerStepped) {
|
||||||
effect->paramListenerStepped(context, *this);
|
effect->paramListenerStepped(context, *this);
|
||||||
}
|
}
|
||||||
effect->requestEntireState(); // TODO: shouldn't be necessary once we have `.invalidate()` working
|
sendUpdateMessage(); // TODO: shouldn't be necessary once we have `.invalidate()` working
|
||||||
} else {
|
} else {
|
||||||
sendUpdateMessage();
|
sendUpdateMessage();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user