Add ack message for worklet death; remove max pool size

This commit is contained in:
Aria 2026-01-12 13:51:21 -06:00
parent 753dc48b69
commit 7c5f53f9ae
4 changed files with 34 additions and 9 deletions

View file

@ -186,7 +186,10 @@ export function registerSynthSounds() {
});
o.port.postMessage({ type: 'initialize' });
o.port.onmessage = (e) => {
if (e.data.type === 'died') markWorkletAsDead(o);
if (e.data.type === 'died') {
markWorkletAsDead(o);
o.port.postMessage({ type: 'diedACK' });
}
o.port.onmessage = null;
};
const gainAdjustment = 1 / Math.sqrt(voices);