audio: add master volume on -/= and move effect value to shift -/=; route connect flow notices to chat buffer

This commit is contained in:
Jage9
2026-02-22 18:33:55 -05:00
parent 12d3c62916
commit f2734659d2
9 changed files with 93 additions and 13 deletions

View File

@@ -137,11 +137,12 @@ export class ItemEmitRuntime {
const initialRates = resolveEmitRates(item);
setElementPreservesPitch(element, initialRates.preservePitch);
element.playbackRate = initialRates.playbackRate;
const destination = this.audio.getOutputDestinationNode() ?? audioCtx.destination;
if (this.audio.supportsStereoPanner()) {
panner = audioCtx.createStereoPanner();
gain.connect(panner).connect(audioCtx.destination);
gain.connect(panner).connect(destination);
} else {
gain.connect(audioCtx.destination);
gain.connect(destination);
}
this.outputs.set(item.id, { soundUrl, element, source, effectInput, effectRuntime, effect, effectValue, gain, panner });
void element.play().catch(() => undefined);