1
0

Don't abort if the state-load invalidates something

This commit is contained in:
Geraint 2025-06-26 16:11:01 +01:00
parent 124fd4592a
commit 51700553b0
3 changed files with 5 additions and 7 deletions

View File

@ -421,7 +421,6 @@ struct Plugin : public clap_plugin {
},
.param_id=param.id,
};
LOG_EXPR(event.header.type);
// Not *super* bothered if this fails
events->try_push(events, &event.header);
};
@ -444,7 +443,6 @@ struct Plugin : public clap_plugin {
.channel=-1,
.key=-1
};
LOG_EXPR(event.header.type);
if (param.rangeParam) {
event.value = param.rangeInfo->toUnit((double)*param.rangeParam);
} else {

View File

@ -38,7 +38,7 @@ struct STFXStorageScanner : public signalsmith::storage::StorageScanner<SubClass
template<class SubClassCRTP=void>
struct STFXStorageWriter : public signalsmith::storage::StorageCborWriter<SubClassCRTP> {
using signalsmith::storage::StorageCborWriter<SubClassCRTP>::StorageCborWriter;
void info(const char *name, const char *desc) {
sub().extra("name", name);
sub().extra("desc", desc);
@ -103,7 +103,6 @@ struct STFXStorageReader : public signalsmith::storage::StorageCborReader<SubCla
}
void invalidate(const char *invalidatedKey) {
LOG_EXPR(invalidatedKey);
abort();
}
template<class PR>

View File

@ -56,7 +56,8 @@ struct WebStateReader : public storage::STFXStorageReader<WebStateReader> {
void extra(const char *key, V v) {}
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) {
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 {
sendUpdateMessage();
}
@ -249,7 +250,7 @@ struct WebUIHelper {
if (effect->paramListenerStepped) {
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 {
sendUpdateMessage();
}