diff --git a/client/public/version.js b/client/public/version.js index ea5ff6b..d1c35db 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.02.22 R132"; +window.CHGRID_WEB_VERSION = "2026.02.22 R133"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/audio/itemEmitRuntime.ts b/client/src/audio/itemEmitRuntime.ts index 947433d..bb0d870 100644 --- a/client/src/audio/itemEmitRuntime.ts +++ b/client/src/audio/itemEmitRuntime.ts @@ -49,9 +49,17 @@ function resolveEmitRates(item: WorldItem): { playbackRate: number; preservePitc const globals = getItemTypeGlobalProperties(item.type); const speed = resolveEmitPlaybackRate(item.params.emitSoundSpeed ?? globals.emitSoundSpeed ?? 50); const tempo = resolveEmitPlaybackRate(item.params.emitSoundTempo ?? globals.emitSoundTempo ?? 50); - const playbackRate = Math.max(0.25, Math.min(4, speed * tempo)); - const preservePitch = Math.abs(speed - 1) < 0.001; - return { playbackRate, preservePitch }; + const speedOffset = Math.abs(speed - 1); + if (speedOffset > 0.001) { + return { + playbackRate: Math.max(0.25, Math.min(4, speed)), + preservePitch: false, + }; + } + return { + playbackRate: Math.max(0.25, Math.min(4, tempo)), + preservePitch: true, + }; } export class ItemEmitRuntime {